It appears that bind resets vi/emacs mode, so call histedit() after every bind call to make sure the state remains consistent.
This might be a bigger hammer than necessary, or it might be that this should be addressed in libedit itself.
PR: 280889
Differential D46321
sh: move histedit() call outside of test for bind - emaste on Aug 19 2024, 5:04 PM. Authored by Tags None Referenced Files
Subscribers None
Details
Diff Detail
Event TimelineComment Actions I believe the problem was introduced in 5fe973734866 or ef0d94a3d34c where ^[[A is introduced. I think libedit doesn't have the code to parse that properly. Fortunately it can be replaced with \e. https://reviews.freebsd.org/P645 is a diff that teaches libedit how to parse it, by the way. Comment Actions Unfortunately I was wrong and it actually doesn't change anything except perhaps it improves code clarity. To quote my email to Christos:
|