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

Re: Patch for completion with svn 1.5.0



Christopher Key wrote:
> I thought I'd tested this with the old version of svn, but hadn't
> actually managed to (the command being called by the completion logic
> was still version 1.5).  The ?: in the pattern is a perl thing to tell
> it not store the result of the match grouped by the brackets, but would
> appear not apply to shell scripting.  Instead, "arg" should be replaced
> simply with "(arg|ARG)".  I've attached a patch for this.  There are a
> few other oddities with svn 1.5 too, I'll have a look and see if I can
> deal with any of them.

Thanks, I had to restore a space...

>          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]$matc
> h[3]}
> +          ${=${${${(M)${(f)"$(LC_ALL=C _call_program options svnadmin help $
> cmd)"##*Valid options:}:#*:*}%% #:*}/ (arg|ARG)/:arg:}/(#b)-([[:alpha:]]) \[-
                            ^ here, before the colon.
> -([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2
> ]$match[3]}
>          )

for "svnadmin help help" to work.  This was 1.4.4.  I got it simply by
copying from the svn help equivalent.  I don't know if this is correct
for other versions.  I don't really understand why, either, but it seems
to make everything happy.

-- 
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