[Bug 286429] vi mode in /bin/sh not leaving insert mode until set -o is run

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 29 Apr 2025 00:12:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286429

--- Comment #1 from Mason Loring Bliss <mason@blisses.org> ---
If I jexec into /bin/sh and source root's .shrc, for instance, I see the 
same issue. In either case - ssh or jexec - if I say set -o vi, it works 
right off the bat.

And... It's one of the binds. Or all of them. If I comment them all out,
vi mode works appropriately. If I uncomment any of them, I see the broken
behaviour.

# # csh like history on arrow up and down
#bind ^[[A ed-search-prev-history
#bind ^[[B ed-search-next-history

# # ctrl+arrow allow to jump from words to words
#bind "\\e[1;5C" em-next-word
#bind "\\e[1;5D" ed-prev-word
alias history='fc -l'

# Fix home/del for mobaxterm
#bind ^[[5~ ed-move-to-beg
#bind ^[[6~ ed-move-to-end

I'm still unclear on why running "set -o" mitigates the issue. I'm a
little curious if that undoes those binds, when vi mode is enabled.

-- 
You are receiving this mail because:
You are the assignee for the bug.