pass C-r and C-s to shell in interactive mode
This commit is contained in:
parent
c6b4d90b80
commit
5dda71b3d9
1 changed files with 13 additions and 0 deletions
13
shell.c
13
shell.c
|
|
@ -2556,6 +2556,15 @@ static void do_shell_backspace(EditState *e)
|
|||
}
|
||||
}
|
||||
|
||||
static void do_shell_search(EditState *e, int dir)
|
||||
{
|
||||
if (e->interactive) {
|
||||
shell_write_char(e, dir < 0 ? ('r' & 31) : ('s' & 31));
|
||||
} else {
|
||||
do_isearch(e, dir, NO_ARG);
|
||||
}
|
||||
}
|
||||
|
||||
static void do_shell_kill_word(EditState *e, int dir)
|
||||
{
|
||||
ShellState *s = shell_get_state(e, 1);
|
||||
|
|
@ -3132,6 +3141,10 @@ static CmdDef shell_commands[] = {
|
|||
"shell-tabulate", do_shell_tabulate, ES, "*")
|
||||
CMD0( KEY_CTRL('l'), KEY_NONE,
|
||||
"shell-refresh", do_shell_refresh)
|
||||
CMD1( KEY_CTRL('r'), KEY_NONE,
|
||||
"shell-search-backward", do_shell_search, -1)
|
||||
CMD1( KEY_CTRL('s'), KEY_NONE,
|
||||
"shell-search-forward", do_shell_search, 1)
|
||||
CMD2( KEY_CTRL('k'), KEY_NONE,
|
||||
"shell-kill-line", do_shell_kill_line, ESi, "ui")
|
||||
CMD2( KEY_META('k'), KEY_NONE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue