diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-11-11 10:35:55 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-11-11 10:35:55 +0000 |
commit | 990f7b91df5152bb7b873b7b998615744cd5d8e4 (patch) | |
tree | bc3c426d31d17e585ef56d6f6de0af63e995a45f /Completion/Unix/Command | |
parent | a7b9b5f851898c569b4887afcdf768c3d5b058df (diff) | |
download | zsh-990f7b91df5152bb7b873b7b998615744cd5d8e4.tar.gz zsh-990f7b91df5152bb7b873b7b998615744cd5d8e4.tar.xz zsh-990f7b91df5152bb7b873b7b998615744cd5d8e4.zip |
_perforce completion bug fixes
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_perforce | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce index 7d9aa48eb..e77267b45 100644 --- a/Completion/Unix/Command/_perforce +++ b/Completion/Unix/Command/_perforce @@ -987,9 +987,12 @@ _perforce_files() { altfiles+=("$type-files:$type file:_perforce_${type}_files") done - altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs" - "subdirs:subdirectory search:_perforce_subdirs" - "directories:directory:_path_files -/") + altfiles+=("subdirs:subdirectory search:_perforce_subdirs") + if zstyle -t ":completion:${curcontext}:" depot-files; then + altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs") + else + altfiles+=("directories:directory:_path_files -/") + fi _alternative $altfiles elif zstyle -t ":completion:${curcontext}:" depot-files; then local -a altfiles @@ -1044,7 +1047,9 @@ _perforce_filetypes() { (( $+functions[_perforce_groups] )) || _perforce_groups() { - _describe -t groups 'Perforce group' $(_perforce_call_p4 groups groups) + local -a values + values=($(_perforce_call_p4 groups groups)) + _describe -t groups 'Perforce group' values } @@ -1275,7 +1280,7 @@ _perforce_users() { ul=(${${(f)"$(_perforce_call_p4 users users)"}/\ /:}) [[ $#ul -eq 1 && $ul[1] = '' ]] && ul=() - _describe -t clients 'Perforce client' ul + _describe -t users 'Perforce user' ul } |