Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#299950: zsh: Better completion for "svn revert"



> 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