summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--Completion/Unix/Type/_path_commands12
2 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f5a3a8282..b3aa12193 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-08 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * users/16711: Completion/Unix/Type/_path_commands: try to take
+ account of PATH_DIRS option in command completion.
+
+ * 30101: Doc/Zsh/options.yo, Src/hashtable.c, Src/options.c,
+ Src/zsh: add HASH_EXECUTABLES_ONLY option, off by default to
+ avoid problems with huge paths and remote directories.
+
2012-01-07 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 30098: Jun T.: Src/params.c: more minimal alternative to
@@ -15842,5 +15851,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5558 $
+* $Revision: 1.5559 $
*****************************************************
diff --git a/Completion/Unix/Type/_path_commands b/Completion/Unix/Type/_path_commands
index 393c0c67e..22d2aaeba 100644
--- a/Completion/Unix/Type/_path_commands
+++ b/Completion/Unix/Type/_path_commands
@@ -82,6 +82,18 @@ if [[ -n $need_desc ]]; then
else
_wanted commands expl 'external command' compadd "$@" -k commands && ret=0
fi
+if [[ -o path_dirs ]]; then
+ local -a path_dirs
+ path_dirs=(${^path}/*(/N:t))
+ (( ${#path_dirs} )) &&
+ _wanted path-dirs expl 'directory in path' compadd "$@" -a path_dirs && ret=0
+
+ if [[ $PREFIX$SUFFIX = */* ]]; then
+ # Find command from path, not hashed
+ _wanted commands expl 'external command' _path_files -W path -g '*(*)' &&
+ ret=0
+ fi
+fi
return $ret
}