about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-03-11 16:32:07 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-03-11 16:32:07 +0000
commitf2dca9e155f25ee57f15df7dc2dc81489e1abbae (patch)
tree7fcb3500f0c2c7d66b12fe3a50e92e2913d26cc7 /Completion/Zsh
parentcc69ecfb9e10fca2d8f68100ff9f2365dedb1405 (diff)
downloadzsh-f2dca9e155f25ee57f15df7dc2dc81489e1abbae.tar.gz
zsh-f2dca9e155f25ee57f15df7dc2dc81489e1abbae.tar.xz
zsh-f2dca9e155f25ee57f15df7dc2dc81489e1abbae.zip
users/15864: turn zsh_directory_name into a hook
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Context/_dynamic_directory_name12
1 files changed, 10 insertions, 2 deletions
diff --git a/Completion/Zsh/Context/_dynamic_directory_name b/Completion/Zsh/Context/_dynamic_directory_name
index 5f7fe9a90..fbea15a7a 100644
--- a/Completion/Zsh/Context/_dynamic_directory_name
+++ b/Completion/Zsh/Context/_dynamic_directory_name
@@ -1,7 +1,15 @@
 #autoload
 
-if [[ -n $functions[zsh_directory_name] ]]; then
-  zsh_directory_name c
+local func
+integer ret=1
+
+if [[ -n $functions[zsh_directory_name] || \
+  ${+zsh_directory_name_functions} -ne 0 ]] ; then
+  zsh_directory_name c && ret=0
+  for func in $zsh_directory_name_functions; do
+    $func c && ret=0
+  done
+  return ret
 else
   _message 'dynamic directory name: implemented as zsh_directory_name c'
 fi