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

PATCH: _subversion usage parsing fix



This will handle help output in the form of
usage: 1. proplist [TARGET[@REV]...]
       2. proplist --revprop -r REV [URL]


Someone who actually cares about svn might want to refine that a bit.

Index: Completion/Unix/Command/_subversion
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_subversion,v
retrieving revision 1.15
diff -u -r1.15 _subversion
--- Completion/Unix/Command/_subversion	11 Aug 2005 14:56:18 -0000	1.15
+++ Completion/Unix/Command/_subversion	23 Aug 2005 18:51:54 -0000
@@ -28,7 +28,7 @@
       if (( $#cmd )); then
         curcontext="${curcontext%:*:*}:svn-${cmd}:"
 
-        usage=${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"}:#usage:*}#usage: $cmd] }
+        usage=${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"}:#usage:*}#usage:*$cmd] }
         args=(
           ${=${${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"##*Valid options:}:#* :*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}
         )
@@ -66,7 +66,7 @@
             )
           ;;
           *)
-            case $_svn_subcmd_usage in
+            case $usage in
               *(SRC|DST|TARGET|URL*PATH)*)
                 args+=(
 	          '*: : _alternative "files:file:_files" "urls:URL:_svn_urls"'



Messages sorted by: Reverse Date, Date, Thread, Author