summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
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