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

Re: [PATCH] improved bash completion v4

From: Fabien COELHO <fabien_at_coelho.net>
Date: 2005-11-20 19:00:43 CET

Dear Joan,

> There is a lot of good stuff in here and it is time I committed it, but
> I wish you could stop adding new features to it at the same time as
> fixing bugs.

Indeed.

> Each new feature brings more bugs.

Sure. Welcome to software development;-)

> ~/src/subversion> svn pset svn:log --revprop --revision 10 --password _
> <TAB>
> svn completion: give your secret string for the connection
> _
>
> So we've got a new trick: displaying prompt messages.
> I find that message unnecessary and ugly.

I do agree that the feature is debatable.
BTW, YOU suggested to put messages, so you are part responsible;-)

> By the way, I think there is a way to make Bash not do the default filename
> completion when you return an empty list: remove "-o default" from the
> "complete" command. If you do that, then you will need to return an array
> generated by something like "compgen -o default" in the cases where a
> filename is allowed.

That looks like what I was looking for, but I was hoping for something
simpler.

> I don't like this script using environment variables named "SVN_*"
> "SVN_BASH_".

It would still be a SVN_* variable;-) But it is less ambiguous than the
names I suggested.

> So, if you will just remove those messages (for password, username and too
> many arguments) and replace them with something simple that beeps or does
> nothing or just allows the default filename completion (I know you didn't
> like that but at least it's simple and expected and usually beeps anyway),
> and fix the bugs below, I'll commit this good work.

Ok.

>> + diff|di) [[ ! $hasRevisionOpt ]] && nExpectArgs=2
>
> That's wrong for "diff": any number of arguments is OK in a plain command like:
>
> svn diff utils.c utils.h main.c

Indeed, I misinterpreted the svn help.

>> + switch|sw) [[ ! $hasRelocate ]] && nExpectArgs=2
>
> That's right in intention (switch without --relocate should have a maximum of
> two arguments) but it doesn't work: it also restricts switch WITH --relocate:

Indeed, it is not good. Maybe a typo somewhere.

So I'll just fix the bugs above without too much creativity, remove the
noisy feature and resubmit later...

-- 
Fabien.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 20 19:01:37 2005

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