about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-06-11 09:10:42 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-06-11 09:10:42 +0000
commit1bb5b24d4e5627e147616dbfc49a96262e11d094 (patch)
treebc873a9d12bcb364b964b6977b38dff3ca984c1f /Completion
parentb88864a2898d71ff401a6b0584e98b81b35ec7f3 (diff)
downloadzsh-1bb5b24d4e5627e147616dbfc49a96262e11d094.tar.gz
zsh-1bb5b24d4e5627e147616dbfc49a96262e11d094.tar.xz
zsh-1bb5b24d4e5627e147616dbfc49a96262e11d094.zip
23543: work around problem with ... in _perforce
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_perforce37
1 files changed, 23 insertions, 14 deletions
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index d2f2dda9d..28eda3080 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -858,14 +858,20 @@ _perforce_resolved_files() {
 }
 
 
-(( $+functions[_perforce_subdirs] )) ||
-_perforce_subdirs() {
-  # This has no other function than to offer to add the `...' used
-  # by Perforce to indicate a recursive search of directories.
-  # Bit pathetic, really.
-  compset -P '*/'
-  compadd "$@" '...'
-}
+# This has no other function than to offer to add the `...' used
+# by Perforce to indicate a recursive search of directories.
+# Bit pathetic, really.
+#
+# This has been causing odd effects with prefixes so is turned off.
+#(( $+functions[_perforce_subdirs] )) ||
+#_perforce_subdirs() {
+#  if [[ $PREFIX = */* ]]; then
+#    local dir=${PREFIX%%[^/]#}
+#    compadd "$@" -J subdirs -p $dir ...
+#  else
+#    compadd "$@" -J subdirs ...
+#  fi
+#}
 
 
 (( $+functions[_perforce_depot_dirs] )) ||
@@ -1076,7 +1082,8 @@ _perforce_files() {
       altfiles+=("client-dirs:client directory:_perforce_client_dirs")
     fi
     altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs"
-      "subdirs:subdirectory search:_perforce_subdirs")
+#      "subdirs:subdirectory search:_perforce_subdirs"
+    )
     _alternative $altfiles
   elif [[ -n $unmaintained && -z $dodirs ]]; then
     # a la _cvs_nonentried_files: directories are never maintained,
@@ -1113,7 +1120,7 @@ _perforce_files() {
       altfiles+=("$type-files:$type file:_perforce_${type}_files")
     done
 
-    altfiles+=("subdirs:subdirectory search:_perforce_subdirs")
+#    altfiles+=("subdirs:subdirectory search:_perforce_subdirs")
     if zstyle -t ":completion:${curcontext}:" depot-files; then
       altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs")
     else
@@ -1126,13 +1133,15 @@ _perforce_files() {
       altfiles+=("depot-files:file in depot:_perforce_depot_files")
     fi
     altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs"
-      "subdirs:subdirectory search:_perforce_subdirs")
+#      "subdirs:subdirectory search:_perforce_subdirs"
+    )
     _alternative $altfiles
   else
     # Look locally.
-    _alternative \
-      "files:file:_path_files -R _perforce_file_suffix $dodirs" \
-      "subdirs:subdirectory search:_perforce_subdirs"
+#   _alternative \
+#      "files:file:_path_files -R _perforce_file_suffix $dodirs" \
+#      "subdirs:subdirectory search:_perforce_subdirs"
+    _path_files -R _perforce_file_suffix $dodirs
   fi
 }