mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 02:42:46 +00:00
sh: improve emacs mode
In emacs mode, force ^R to backware search the history
This behaviour is the default in emacs mode for most of the other shells
Note: Note that this can still be overridden via $EDITRC, ~/.editrc or a
bind command after set -o emacs.
Approved by: jilles
Reviewed by: jilles, arichardson, pstef
Differential Revision: https://reviews.freebsd.org/D29494
(cherry picked from commit 660045fb53
)
This commit is contained in:
parent
5a37780dd8
commit
2f2bbc485f
@ -139,8 +139,10 @@ bad:
|
||||
if (el) {
|
||||
if (Vflag)
|
||||
el_set(el, EL_EDITOR, "vi");
|
||||
else if (Eflag)
|
||||
else if (Eflag) {
|
||||
el_set(el, EL_EDITOR, "emacs");
|
||||
el_set(el, EL_BIND, "^R", "em-inc-search-prev", NULL);
|
||||
}
|
||||
el_set(el, EL_BIND, "^I", "sh-complete", NULL);
|
||||
el_source(el, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user