summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-12-17 09:47:58 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-12-17 09:47:58 +0000
commit53557009925025b0c17d30511813b87bc2ce340a (patch)
tree70b473979aa02f7f70cc6581e92094e34e678aff /Completion/Unix/Command
parent693fd5b56e51de2910a5681533033b9530650270 (diff)
downloadzsh-53557009925025b0c17d30511813b87bc2ce340a.tar.gz
zsh-53557009925025b0c17d30511813b87bc2ce340a.tar.xz
zsh-53557009925025b0c17d30511813b87bc2ce340a.zip
Greg: 27529: ULR schemas in subversion completion
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_subversion12
1 files changed, 8 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 2dbcb6d65..f0dbb5fc2 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -249,7 +249,7 @@ _svn_remote_paths() {
 
 (( $+functions[_svn_urls] )) ||
 _svn_urls() {
-  local expl ret=1
+  local urlsch expl ret=1
 
   # first try completing a remote path; if successful, we are all done..
   _svn_remote_paths && return 0
@@ -260,9 +260,13 @@ _svn_urls() {
   _urls -S/ && ret=0
 
   if [[ ! -prefix *://? ]] ; then
-    compset -S '[^:]*'
-    _wanted url-schemas expl 'URL schema' compadd -S '' - \
-        file:// http:// https:// svn:// svn+ssh:// && ret=0
+    zstyle -a ":completion:${curcontext}:" url-schemas urlsch \
+     || urlsch=( file:// http:// https:// svn:// svn+ssh:// )
+    
+    if (( $#urlsch )) ; then
+      compset -S '[^:]*'
+      _wanted url-schemas expl 'URL schema' compadd -S '' - $urlsch[@] && ret=0
+    fi
   fi
 
   return ret