On 1/21/19 10:01 PM, Greg Bell wrote: > > Hi Chet et al, > > On bash 4.3.48 (Ubuntu 16.04), \C-e doesn't work to move me to the end of > line when in vi command mode.
Thanks for the report. This has been there forever. The default readline vi command-mode keymap has ^E bound to switch to emacs editing mode. Since bash uses `set -o emacs' for that, the bash readline initialization code unbinds the key sequence. It needs to make sure that the function it's bound to is still rl_emacs_editing_mode. Here's a patch that fixes it. Chet -- ``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/
*** ../bash-5.0-patched/bashline.c 2019-01-16 16:13:21.000000000 -0500 --- bashline.c 2019-01-22 08:48:05.000000000 -0500 *************** *** 498,502 **** rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap); #if defined (VI_MODE) ! rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap); #endif --- 498,505 ---- rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap); #if defined (VI_MODE) ! kseq[0] = CTRL('E'); ! func = rl_function_of_keyseq (kseq, vi_movement_keymap, (int *)NULL); ! if (func == rl_emacs_editing_mode) ! rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap); #endif