diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Zsh/compwid.yo | 5 | ||||
-rw-r--r-- | Doc/Zsh/params.yo | 43 |
2 files changed, 48 insertions, 0 deletions
diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo index 80427330d..b8786dd26 100644 --- a/Doc/Zsh/compwid.yo +++ b/Doc/Zsh/compwid.yo @@ -58,6 +58,11 @@ endmenu() texinode(Completion Special Parameters)(Completion Builtin Commands)()(Completion Widgets) sect(Completion Special Parameters) +The parameters tt(ZLE_REMOVE_SUFFIX_CHARS) and tt(ZLE_SPACE_SUFFIX_CHARS) +are used by the completion mechanism, but are not special. +ifzman(See em(Parameters Used By The Shell) in zmanref(zshparam))\ +ifnzman(noderef(Parameters Used By The Shell)). + Inside completion widgets, and any functions called from them, some parameters have special meaning; outside these functions they are not special to the shell in any way. These parameters are used to pass diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index 7a8efdd94..e36becf53 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -1330,4 +1330,47 @@ item(tt(ZDOTDIR))( The directory to search for shell startup files (.zshrc, etc), if not tt($HOME). ) +vindex(ZLE_REMOVE_SUFFIX_CHARS) +vindex(ZLE_SPACE_SUFFIX_CHARS) +xitem(tt(ZLE_REMOVE_SUFFIX_CHARS)) +item(tt(ZLE_SPACE_SUFFIX_CHARS))( +These parameters are used by the line editor. In certain circumstances +suffixes (typically space or slash) added by the completion system +will be removed automatically, either because the next editing command +was not an insertable character, or because the character was marked +as requiring the suffix to be removed. + +These variables can contain the sets of characters that will cause the +suffix to be removed. If tt(ZLE_REMOVE_SUFFIX_CHARS) is set, those +characters will cause the suffix to be removed; if +tt(ZLE_SPACE_SUFFIX_CHARS) is set, those characters will cause the +suffix to be removed and replaced by a space. + +If tt(ZLE_REMOVE_SUFFIX_CHARS) is not set, the default behaviour is +equivalent to: + +example(ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&|') + +If tt(ZLE_REMOVE_SUFFIX_CHARS) is set but is empty, no characters have this +behaviour. tt(ZLE_SPACE_SUFFIX_CHARS) takes precedence, so that the +following: + +example(ZLE_SPACE_SUFFIX_CHARS=$'&|') + +causes the characters `tt(&)' and `tt(|)' to remove the suffix but to +replace it with a space. + +To illustrate the difference, suppose that the option tt(AUTO_REMOVE_SLASH) +is in effect and the directory tt(DIR) has just been completed, with an +appended tt(/), following which the user types `tt(&)'. The default result +is `tt(DIR&)'. With tt(ZLE_REMOVE_SUFFIX_CHARS) set but without including +`tt(&)' the result is `tt(DIR/&)'. With tt(ZLE_SPACE_SUFFIX_CHARS) set to +include `tt(&)' the result is `tt(DIR &)'. + +Note that certain completions may provide their own suffix removal +or replacement behaviour which overrides the values described here. +See the completion system documentation in +ifzman(zmanref(zshcompsys))\ +ifnzman(noderef(Completion System)). +) enditem() |