Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#299950: zsh: Better completion for "svn revert"
- X-seq: zsh-workers 21068
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#299950: zsh: Better completion for "svn revert"
- Date: Sat, 26 Mar 2005 19:36:52 -0500
- Cc: Vincent Lefevre <vincent@xxxxxxxxxx>, 299950-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <20050325161734.GT19392@xxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, Vincent Lefevre <vincent@xxxxxxxxxx>, 299950-forwarded@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050317142638.GA23797@xxxxxxxxxxxxxxxx> <20050325142839.GA32333@xxxxxxxxxxx> <20050325161734.GT19392@xxxxxxxxxxxxx>
> This wouldn't be sufficient. In the first column, this would be at
> least 'A', 'D' (note that the file no longer exists, but completion
> should be able to give the deleted file) and 'M'. In the second
> column, this would be 'M'.
I'm not sure I understand. Does this patch make it do the right thing?
Index: Completion/Unix/Command/_subversion
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_subversion,v
retrieving revision 1.8
diff -u -r1.8 _subversion
--- Completion/Unix/Command/_subversion 23 Jan 2005 19:56:09 -0000 1.8
+++ Completion/Unix/Command/_subversion 27 Mar 2005 00:32:18 -0000
@@ -21,6 +21,11 @@
[[ -f ${(M)REPLY##*/}.svn/text-base/${REPLY##*/}.svn-base ]]
}
+(( $+functions[_svn_adm_files] )) ||
+_svn_adm_files() {
+ compadd ${${(M)${(f)"$(svn status)"}:#(#s)[ADM]*}##[ADM] ##}
+}
+
(( $+functions[_svn_urls] )) ||
_svn_urls() {
local expl
@@ -82,6 +87,11 @@
'*:file:_files -g "*(e:_svn_controlled:)"'
)
;;
+ (revert)
+ _svn_subcmds+=(
+ '*:file:_svn_adm_files'
+ )
+ ;;
*)
case $_svn_subcmd_usage in
*(SRC|DST|TARGET|URL*PATH)*)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author