summaryrefslogtreecommitdiff
path: root/Doc/Zsh/compsys.yo
diff options
context:
space:
mode:
authordana <dana@dana.is>2024-12-16 10:37:55 -0600
committerdana <dana@dana.is>2024-12-16 10:37:55 -0600
commitd905c7a0d7d8fb789e7f508eb4610ddfa280cf54 (patch)
tree60c22fd37713c62fd4c5dc52f994180e74a5d3df /Doc/Zsh/compsys.yo
parent86d5f24a3d28541f242eb3807379301ea976de87 (diff)
downloadzsh-d905c7a0d7d8fb789e7f508eb4610ddfa280cf54.tar.gz
zsh-d905c7a0d7d8fb789e7f508eb4610ddfa280cf54.zip
52108: docs: document benefits of `_normal -p`
note: commit was severely delayed
Diffstat (limited to 'Doc/Zsh/compsys.yo')
-rw-r--r--Doc/Zsh/compsys.yo12
1 files changed, 9 insertions, 3 deletions
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 9b7f91148..7ae67773b 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -4397,8 +4397,10 @@ the functions for the fields if they are called.
findex(_command_names)
item(tt(_command_names) [ tt(-e) | tt(-) ])(
This function completes words that are valid at command position: names of
-aliases, builtins, hashed commands, functions, and so on. With the tt(-e)
-flag, only hashed commands are completed. The tt(-) flag is ignored.
+aliases, builtins, hashed commands, functions, and so on. If the tt(-e)
+flag is given, or if the list of precommands contains a non-builtin command
+(e.g. because tt(_normal -p) has been used previously), only hashed commands
+are completed. The tt(-) flag is ignored.
)
findex(_comp_locale)
item(tt(_comp_locale))(
@@ -4784,7 +4786,11 @@ functions) regardless of prior precommands (e.g. `tt(zsh -c)').
)
item(tt(-p) var(precommand))(
Append var(precommand) to the list of precommands. This option should be
-used in nearly all cases in which tt(-P) is not applicable.
+used in nearly all cases in which tt(-P) is not applicable. An advantage
+of using this option is that it can automatically signal to
+tt(_command_names) that subsequent completion should be limited to hashed
+commands, which is usually the desired behaviour following commands like
+tt(chroot) and tt(nohup).
)
enditem()