[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-26 14:30:19 CEST

Philip Martin wrote:
>>At 2:55 AM +0100 7/26/03, Philip Martin wrote:
>>>My argument is that "svn --help " breaks further completion so I don't
>>>want to completion to suggest it. ...

That's a reasonable argument. I hadn't thought of it that way around because I don't use "--help" followed by a subcommand. I think of the valid syntaxes for help as being:

  svn --help|-h|-?
  svn help|h|? [SUBCOMMAND...]
  svn SUBCOMMAND --help|-h|-?

But "svn" accepts more than those.

I'm happy now that I understand your reasoning.

> --help option to be suggested as a completion for "svn". What do we
> gain by encouraging "svn --help" over "svn help"?

You mean 'by offering "--help" as well as "help"'. We gain completion of "svn --h" to "svn --help " which tends to be what I want. (If I want help on a subcommand I use "svn help SUBCOMMAND" or "svn SUBCOMMAND --help" instead.) But as you point out, if the user asks for completion of "svn " then "--help" is listed as well as "help" and the user might choose "--help" and then try to get completion of subcommands, which doesn't work. If "--help" had not been listed, he would have been more likely to have used "help" after which subcommand completion does work. Pros and cons. I don't mind either way now.

Two more-significant issues:

1. An enhancement. On completing "st", it is annoying to stop at "st", "stat" and "status"; I think it should expand to "status" immediately. This applies to most subcommands, but there are one or two exceptions: "co" should not expand immediately to "commit" as it means something else.

2. It is difficult and unhelpful to make the completion match exactly the syntax that "svn" accepts because the syntax of "svn" itself is still, in my opinion, broken (including being too loose and not clearly defined). Can we work on that instead?

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 26 14:23:10 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.