diff options
Diffstat (limited to 'Completion/Zsh/Context/_dynamic_directory_name')
-rw-r--r-- | Completion/Zsh/Context/_dynamic_directory_name | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/Completion/Zsh/Context/_dynamic_directory_name b/Completion/Zsh/Context/_dynamic_directory_name index f449c3b12..5e0d73a8d 100644 --- a/Completion/Zsh/Context/_dynamic_directory_name +++ b/Completion/Zsh/Context/_dynamic_directory_name @@ -1,15 +1,29 @@ #autoload +local -a dirfuncs=( + ${(k)functions[zsh_directory_name]} + $zsh_directory_name_functions +) +local descr='dynamically named directory' -local func -integer ret=1 +if (( $#dirfuncs )); then + local -a expl + local -i ret + local func suf tag=dynamically-named-directories -if [[ -n $functions[zsh_directory_name] || \ - ${+zsh_directory_name_functions} -ne 0 ]] ; then - [[ -n $functions[zsh_directory_name] ]] && zsh_directory_name c && ret=0 - for func in $zsh_directory_name_functions; do - $func c && ret=0 + [[ $ISUFFIX != \]* ]] && + suf=-S] + + _tags "$tag" + while _tags; do + while _next_label "$tag" expl "$descr" $suf; do + for func in $dirfuncs; do + $func c && ret=0 + done + done + (( ret )) || break done return ret + else - _message 'dynamic directory name: implemented as zsh_directory_name c' + _message "${descr}: implement as zsh_directory_name c" fi |