about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Command/_perforce15
2 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 88ca3601e..aba2901b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
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
 }