From 8c6a5af791ea0ccf44b71577b4cb1a9cec92646c Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 9 May 2000 11:04:44 +0000 Subject: give control over insertion of tab when no non-blank character before cursor; add insert-tab style (11274) --- Doc/Zsh/compsys.yo | 9 +++++++++ Doc/Zsh/compwid.yo | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'Doc/Zsh') diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index fae8961b7..c4c632ef5 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -1253,6 +1253,15 @@ is any other string, menucompletion will be entered when the string on the line is longer than the prefix of the IDs of all matching processes. ) +kindex(insert-tab, completion style) +item(tt(insert-tab))( +If this has one of the `true' values, the completion system will only +insert the TAB character if the completion code would normally do that +(i.e. when there is no non-blank character to the left of the cursor +yet). If set to `false', completion will be done even there. + +The default value of this style is `true'. +) kindex(insert-unambiguous, completion style) item(tt(insert-unambiguous))( This is used by the tt(_match) and tt(_approximate) completer diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo index 1ca6d11a6..abf15a324 100644 --- a/Doc/Zsh/compwid.yo +++ b/Doc/Zsh/compwid.yo @@ -275,7 +275,10 @@ common prefix is to be inserted and the next invocation of the completion code may start menucompletion (due to the tt(AUTO_MENU) option being set); if set to tt(menu) or tt(automenu) menucompletion will be started for the matches currently generated (in the -latter case this will happen because the tt(AUTO_MENU) is set). +latter case this will happen because the tt(AUTO_MENU) is set). The +value may also contain the string `tt(tab)' when the completion code +woul normally not really do completion, but only insert the TAB +character. On exit it may be set to any of the values above (where setting it to the empty string is the same as unsetting it), or to a number, in which @@ -291,6 +294,10 @@ Both tt(menu) and tt(automenu) may also specify the the number of the match to insert, given after a colon. For example, `tt(menu:2)' says to start menucompletion, beginning with the second match. +Note that a value containing the substring `tt(tab)' makes the +matches generated be ignored and only the character that was used to +call the completion widget be inserted. + Finally, it may also be set to tt(all), which makes all matches generated be inserted into the line. ) -- cgit 1.4.1