The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2abb724cad0faac54dcab7155c684afa724cb3d5
commit 2abb724cad0faac54dcab7155c684afa724cb3d5 Author: Baptiste Daroussin <[email protected]> AuthorDate: 2021-03-30 09:37:29 +0000 Commit: Baptiste Daroussin <[email protected]> CommitDate: 2021-05-05 07:17:09 +0000 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 660045fb5360d328da199ae78c89d5cc15b6d1ca) --- bin/sh/histedit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 4c596c82257e..e59967b255b1 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -137,8 +137,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); } _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
