From 53557009925025b0c17d30511813b87bc2ce340a Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 17 Dec 2009 09:47:58 +0000 Subject: Greg: 27529: ULR schemas in subversion completion --- Completion/Unix/Command/_subversion | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command') 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 -- cgit 1.4.1