]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: reset sh bindings on bind -e, bind -v
authorPiotr Pawel Stefaniak <pstef@FreeBSD.org>
Sun, 19 Sep 2021 20:17:01 +0000 (22:17 +0200)
committerPiotr Pawel Stefaniak <pstef@FreeBSD.org>
Sat, 25 Sep 2021 08:34:38 +0000 (10:34 +0200)
commit14fb8056ceef592c6f392f0f678dc45d11b7417e
tree5ee0de4cf3c4b1272e7ac39f239bdcd895ee9256
parentb2b7eb9e23dcb4381780590fb7393b17d19100f5
sh: reset sh bindings on bind -e, bind -v

Until this change, any bindings set in histedit() were lost on calls to
bindcmd().

Only bind -e and bind -v call libedit's keymacro_reset(). Currently you
cannot fool libedit/map.c:map_bind() by trying something like bind -le
as when p[0] == '-', it does a switch statement on p[1].

(cherry picked from commit 9413dfd331e705a1d7909fe41f06a30e43c442f7)
bin/sh/histedit.c