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

Re: Patch for completion with svn 1.5.0



On Wed, 30 Jan 2008 13:37:54 +0000
Christopher Key <cjk32@xxxxxxxxx> wrote:
> The output of,
> # svn help COMMAND
> has changed slightly between 1.4.x and 1.5.0.  The attached patch deals
> with this.

Thanks, this looks useful.  Your patch got line-wrapped half-way up Milton
Road, so I've reconstructed it slightly.  Does the following look right?
(It survived a half-hearted test.)

I also patched svnadmin help the same way; does this fix Vincent's problem?
(Again, it seemed to do something.)  I'm doing this from ignorance,
however, so if I've broken something I wouldn't know.

Index: Completion/Unix/Command/_subversion
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_subversion,v
retrieving revision 1.24
diff -u -r1.24 _subversion
--- Completion/Unix/Command/_subversion	19 Apr 2007 20:37:04 -0000	1.24
+++ Completion/Unix/Command/_subversion	30 Jan 2008 15:10:08 -0000
@@ -30,7 +30,7 @@
 
         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]}
+          ${=${${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"##*Valid options:}:#* :*}%% #:*}/ (?:arg|ARG)/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}
         )
 
         case $cmd in;
@@ -148,7 +148,7 @@
 
         usage=${${(M)${(f)"$(LC_ALL=C _call_program options svnadmin help $cmd)"}:#$cmd: usage:*}#$cmd: usage: svnadmin $cmd }
         args=(
-          ${=${${${(M)${(f)"$(LC_ALL=C _call_program options svnadmin help $cmd)"##*Valid options:}:#*:*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}
+          ${=${${${(M)${(f)"$(LC_ALL=C _call_program options svnadmin help $cmd)"##*Valid options:}:#* :*}%% #:*}/ (?:arg|ARG)/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}
         )
         if [[ $_svnadmin_subcmd_usage == *REPOS_PATH* ]]; then
           args+=( ":path:_files -/" )

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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