From f2dca9e155f25ee57f15df7dc2dc81489e1abbae Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 11 Mar 2011 16:32:07 +0000 Subject: users/15864: turn zsh_directory_name into a hook --- Completion/Zsh/Context/_dynamic_directory_name | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Completion/Zsh/Context') 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 -- cgit 1.4.1