diff options
author | Matthew Martin <phy1729@gmail.com> | 2019-04-04 18:45:19 -0500 |
---|---|---|
committer | Matthew Martin <phy1729@gmail.com> | 2019-04-04 18:45:19 -0500 |
commit | 5facfd32805831230f9b42b7ec9765e858b553a8 (patch) | |
tree | 338774bab29346eaa1f29dff5813f71611613157 /Doc/Zsh/compsys.yo | |
parent | bb790c8f8118d4428d8effc65b1c5dc03d1637f6 (diff) | |
download | zsh-5facfd32805831230f9b42b7ec9765e858b553a8.tar.gz zsh-5facfd32805831230f9b42b7ec9765e858b553a8.tar.xz zsh-5facfd32805831230f9b42b7ec9765e858b553a8.zip |
44200 (tweaked): Completion: Append to precommands in _normal
Diffstat (limited to 'Doc/Zsh/compsys.yo')
-rw-r--r-- | Doc/Zsh/compsys.yo | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index ba49fe298..f0fdbf293 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -4658,7 +4658,7 @@ fi return ret) ) findex(_normal) -item(tt(_normal))( +item(tt(_normal) [ tt(-p) var(precommand) ])( This is the standard function called to handle completion outside any special tt(-)var(context)tt(-). It is called both to complete the command word and also the arguments for a command. In the second case, @@ -4668,10 +4668,17 @@ there is none it uses the completion for the tt(-default-) context. A second use is to reexamine the command line specified by the tt($words) array and the tt($CURRENT) parameter after those have been modified. For example, the function tt(_precommand), which -completes after pre-command specifiers such as tt(nohup), removes the +completes after precommand specifiers such as tt(nohup), removes the first word from the tt(words) array, decrements the tt(CURRENT) parameter, -then calls tt(_normal) again. The effect is that `tt(nohup) var(cmd ...)' -is treated in the same way as `var(cmd ...)'. +then calls `tt(_normal -p $service)'. The effect is that +`tt(nohup) var(cmd ...)' is treated in the same way as `var(cmd ...)'. + +startitem() +item(tt(-p) var(precommand))( +Append var(precommand) to the list of precommands. This option should be +used in nearly all cases. +) +enditem() If the command name matches one of the patterns given by one of the options tt(-p) or tt(-P) to tt(compdef), the corresponding completion |