1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 13:33:52 +01:00

_perforce completion bug fixes

This commit is contained in:
Peter Stephenson 2003-11-11 10:35:55 +00:00
parent a7b9b5f851
commit 990f7b91df
2 changed files with 16 additions and 5 deletions

@ -1,3 +1,9 @@
2003-11-11 Peter Stephenson <pws@csr.com>
* unposted: Completion/Unix/Command/_perforce: bug in
_perforce_groups; wrong tag for users; directory completion
when not completing all files.
2003-11-03 Peter Stephenson <pws@csr.com>
* 19218: Src/exec.c, Src/Zle/zle_main.c: extend 19216 to

@ -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
}