sh: improve emacs mode

in emacs mode ^W should delete the previous word by default
Note that upstreaming this change directly into libedit is in process.

Reported by:	manu
Reviewed by:	jills, pstef, manu
Differential Revision:	https://reviews.freebsd.org/D29493
This commit is contained in:
Baptiste Daroussin 2021-08-28 14:59:53 +02:00
parent 4544929cb5
commit 3ae61b972b

View File

@ -204,6 +204,7 @@ bad:
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, "^W", "ed-delete-prev-word", NULL);
}
el_set(el, EL_BIND, "^I", "sh-complete", NULL);
el_source(el, NULL);