about summary refs log tree commit diff
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
parent693fd5b56e51de2910a5681533033b9530650270 (diff)
downloadzsh-53557009925025b0c17d30511813b87bc2ce340a.tar.gz
zsh-53557009925025b0c17d30511813b87bc2ce340a.tar.xz
zsh-53557009925025b0c17d30511813b87bc2ce340a.zip
Greg: 27529: ULR schemas in subversion completion
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Unix/Command/_subversion12
2 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e83ae005f..5a94fae95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-17  Peter Stephenson  <pws@csr.com>
+
+	* Greg: 27529: Completion/Unix/Command/_subversion: make URL
+	schemas (schemata?) configurable.
+
 2009-12-16  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* 26735+unposted: Src/utils.c, Src/Modules/zftp.c, Src/Modules/zpty.c,
@@ -12509,5 +12514,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4846 $
+* $Revision: 1.4847 $
 *****************************************************
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