[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] bash_completion: improvement, fixes and tests [was: Re: subversion and programmable completion]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-07-25 23:43:40 CEST

Philip Martin wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>>>>I liked that particular completion, and it was valid.
>>>
>>>If you can make it work I will reinstate it.
>>
>>- COMPREPLY=( $( compgen -W "$cmds" -- $cur ) )
>>+ COMPREPLY=( $( compgen -W "$cmds --help -h" -- $cur ) )
>
> Does this work?

Yes :-) (see below)

> The reason I removed it originally is that if I type
> "svn --help " and then try completion I get filename completion rather
> than a list of svn commands. I tried a few things at the time but
> nothing really worked properly.

I can understand you wanting completion after "svn --help " but that wasn't what those tests were looking at. They were looking at completing the first argument. My one-line patch allows "svn --"<TAB> to produce "--help" and "--version" as completions, rather than just filling in "--version" immediately. It completes "svn --he"<TAB> to "svn --help" immediately. It does not list svn subcommands after "svn --help "<TAB>; it offers "--help" and "-h" which is completely wrong and useless, but exactly the same as your version in that situation.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 25 23:36:35 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.