On 2/27/20 8:40 AM, lockyw...@gmail.com wrote: > --text follows this line-- > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Description: > It is possible to bind shell-backward-word, but not possible to unbind. > > Bash Version: 5.0 > Patch Level: 16 > Release Status: release > > Repeat-By: > 1) bind '"\e\C-b": shell-backward-word' # make binding > 2) bind -P # to check that the binding appeared > 3) bind -u shell-backward-word # to unbind the binding > 4) bind -P # to check that unbinding didn't work > > Fix: > I don't know how to fix the problem.
Well, it's maybe non-obvious. The binding string begins with ESC, which is by default the meta-prefix for emacs mode. That means you do the key binding in the `emacs-meta' keymap. The `-u' option to bind operates on the default keymap, which in emacs mode is `emacs'. If you add the `-m emacs-meta' option to your `bind -u' command, you'll get the results you want. It might be better if the underlying readline function descended into keymaps such as emacs-meta rather than operating on a single keymap, but it doesn't do that right now. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/