implement an extension that an interactive mode input line, when

starting with an ‘!’ exclamation mark at the beginning of a com-
mand (PS1 not PS2), shall have the same effect as the predefined
“r” alias, to be compatible with csh and GNU bash’s “!string” to
«Execute last used command starting with string» – documentation
and feature request provided by wbx@ (Waldemar Brodkorb)
This commit is contained in:
tg
2009-05-27 19:52:38 +00:00
parent b90007d784
commit da5dc48cd0
5 changed files with 141 additions and 10 deletions

4
main.c
View File

@ -33,7 +33,7 @@
#include <locale.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.128 2009/05/16 21:00:51 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.129 2009/05/27 19:52:37 tg Exp $");
extern char **environ;
@ -69,7 +69,7 @@ static const char *initcoms[] = {
"functions=typeset -f",
"history=fc -l",
"nohup=nohup ",
"r=fc -e -",
r_fc_e_,
"source=PATH=$PATH:. command .",
"login=exec login",
NULL,