summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Zsh/Type/_command_names8
-rw-r--r--Doc/Zsh/compsys.yo5
3 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ccb18fdfc..c9387d719 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-05-01 Clint Adams <clint@zsh.org>
+
+ * 19863: Completion/Zsh/Type/_command_names, Doc/Zsh/compsys.yo:
+ allow search path for command names to be overridden by means of new
+ command-path style.
+
2004-04-28 Clint Adams <clint@zsh.org>
* 19845: Completion/Debian/Command/_apt-move: apt-move
diff --git a/Completion/Zsh/Type/_command_names b/Completion/Zsh/Type/_command_names
index a8bf7b481..f2b51713c 100644
--- a/Completion/Zsh/Type/_command_names
+++ b/Completion/Zsh/Type/_command_names
@@ -33,4 +33,12 @@ fi
args=( "$@" )
+local -a cmdpath
+if zstyle -a ":completion:${curcontext}" command-path cmdpath &&
+ [[ $#cmdpath -gt 0 ]]
+then
+ local -a +h path
+ local -A +h commands
+ path=( $cmdpath )
+fi
_alternative -O args "$defs[@]"
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 2bf83f0b0..766280b00 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1140,6 +1140,11 @@ command for each attempt to generate the completion list. Hence
care should be taken to specify only commands that take a short
time to run, and in particular to avoid any that may never terminate.
)
+kindex(command-path, completion style)
+item(tt(command-path))(
+This is a list of directories to search for commands to complete. The
+default for this style is the value of the special parameter tt(path).
+)
kindex(commands, completion style)
item(tt(commands))(
This is used by the function completing sub-commands for the system