Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: complete subversion change lists
- X-seq: zsh-workers 30197
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: complete subversion change lists
- Date: Fri, 10 Feb 2012 16:38:48 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1328888329; bh=EXm10AAlExCK6/cta8vVXElJwVIUwWP2RECaxEG+OR4=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:From:To:Subject:Date:Message-ID; b=L+AJ4TyJFhzVuD4FwAhxFsn60/LVbMk35je0gJXY/210lefjiQmTJWx2A3b2/+hQWK4QdodiNQoG8R0XRqecfnoLlXVUhjMtHDstYOM9Cvlnwas0tNF9VUPai74XpaTrcCq8iqEi59dDdBXkBGylTN3CmCbJ/MeXIQp9JDcxE6M=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This updates subversion completion for one of the newer subversion
features.
Oliver
Index: Completion/Unix/Command/_subversion
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_subversion,v
retrieving revision 1.34
diff -u -r1.34 _subversion
--- Completion/Unix/Command/_subversion 16 Dec 2011 09:18:34 -0000 1.34
+++ Completion/Unix/Command/_subversion 10 Feb 2012 15:36:45 -0000
@@ -31,7 +31,7 @@
_wanted commands expl 'svn command' _svn_commands && ret=0
;;
args)
- local cmd args usage
+ local cmd args usage idx
typeset -gHA _cache_svn_status _cache_svn_mtime
cmd="${${(k)_svn_cmds[(R)*:$words[1]:*]}:-${(k)_svn_cmds[(i):$words[1]:]}}"
@@ -50,6 +50,9 @@
args=(
${=${${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)(-##)([[:alpha:]]##) \[--([a-z-]##)\](:arg:)#/(--$match[3])$match[1]$match[2]$match[4] ($match[1]$match[2])--$match[3]$match[4]}
)
+ while (( idx=$args[(I)*--c(l|hangelist):arg:] )); do
+ args[(I)*--c(l|hangelist):arg:]=( \*{--cl,--changelist}':change list:_svn_changelists' )
+ done
_store_cache svn-${cmd}-args args
fi
@@ -309,6 +312,14 @@
compadd "$@" -a properties && return 0
}
+(( $+functions[_svn_changelists] )) ||
+_svn_changelists() {
+ local cls
+
+ cls=( ${${${(M)${(f)"$(LC_ALL=C _call_program changelists svn status 2>/dev/null)"}:#--- Changelist*}%??}##*\'} )
+ compadd "$@" -a cls && return 0
+}
+
_subversion () {
case $service in
(svn) _svn "$@" ;;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author