Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Increased support for completion search field. Use btab (shift-tab) to
complete-and-search.
  • Loading branch information
ridiculousfish committed Jan 27, 2014
1 parent ce4c145 commit 5be3606
Show file tree
Hide file tree
Showing 11 changed files with 425 additions and 167 deletions.
37 changes: 8 additions & 29 deletions builtin.cpp
Expand Up @@ -571,35 +571,14 @@ static int builtin_bind(parser_t &parser, wchar_t **argv)
static const struct woption static const struct woption
long_options[] = long_options[] =
{ {
{ { L"all", no_argument, 0, 'a' },
L"all", no_argument, 0, 'a' { L"erase", no_argument, 0, 'e' },
} { L"function-names", no_argument, 0, 'f' },
, { L"help", no_argument, 0, 'h' },
{ { L"key", no_argument, 0, 'k' },
L"erase", no_argument, 0, 'e' { L"key-names", no_argument, 0, 'K' },
} { 0, 0, 0, 0 }
, };
{
L"function-names", no_argument, 0, 'f'
}
,
{
L"help", no_argument, 0, 'h'
}
,
{
L"key", no_argument, 0, 'k'
}
,
{
L"key-names", no_argument, 0, 'K'
}
,
{
0, 0, 0, 0
}
}
;


while (1) while (1)
{ {
Expand Down
2 changes: 2 additions & 0 deletions input.cpp
Expand Up @@ -104,6 +104,7 @@ static const wchar_t * const name_arr[] =
L"yank", L"yank",
L"yank-pop", L"yank-pop",
L"complete", L"complete",
L"complete-and-search",
L"beginning-of-history", L"beginning-of-history",
L"end-of-history", L"end-of-history",
L"backward-kill-line", L"backward-kill-line",
Expand Down Expand Up @@ -201,6 +202,7 @@ static const wchar_t code_arr[] =
R_YANK, R_YANK,
R_YANK_POP, R_YANK_POP,
R_COMPLETE, R_COMPLETE,
R_COMPLETE_AND_SEARCH,
R_BEGINNING_OF_HISTORY, R_BEGINNING_OF_HISTORY,
R_END_OF_HISTORY, R_END_OF_HISTORY,
R_BACKWARD_KILL_LINE, R_BACKWARD_KILL_LINE,
Expand Down
1 change: 1 addition & 0 deletions input.h
Expand Up @@ -33,6 +33,7 @@ enum
R_YANK, R_YANK,
R_YANK_POP, R_YANK_POP,
R_COMPLETE, R_COMPLETE,
R_COMPLETE_AND_SEARCH,
R_BEGINNING_OF_HISTORY, R_BEGINNING_OF_HISTORY,
R_END_OF_HISTORY, R_END_OF_HISTORY,
R_BACKWARD_KILL_LINE, R_BACKWARD_KILL_LINE,
Expand Down
1 change: 0 additions & 1 deletion input_common.cpp
Expand Up @@ -251,7 +251,6 @@ wchar_t input_common_readch(int timed)
case 0: case 0:
return 0; return 0;
default: default:

return res; return res;
} }
} }
Expand Down

0 comments on commit 5be3606

Please sign in to comment.