Thanks for the very active testing;-)
> This patch makes Bash suggest different completions in different
> circumstances: in particular, if you request completion of an empty word and
> there is some required part missing from the command, it only suggests the
> missing thing. I wasn't too sure about that idea to begin with, but it seems
> to work rather well in practice.
I think that directing the syntax to provide the mandatory parts helps.
The price is that options are actually parsed.
> I found some bugs:
> $ svn pe --revprop -r10 svn:l_
> $ svn pe --revprop -r10 svn:svn:log
> This doesn't happen every time, only when trying that completion for the
> first time after trying a different one. Perhaps that indicates an
> uninitialised variable or similar.
Maybe. I'll try to spot the reason for it.
> $ svn bl_ subversion/clients/cmdline/main.c
> $ svn blank-log-msg.patch subversion/clients/cmdline/main.c
> That's the name of a local file; it should complete the subcommand name
> "blame" instead. The filename afterwards seems to confuse it.
Yep. I'm not sure the script is ok when completing inside a line rather
than at the end. I have not tested that, so it must be wrong.
> $ svn pset svn:mime-type ima_ www/images/jolt-2005.jpg
> Similarly, here I expect the completion "image/", but it doesn't recognise
> that I'm entering a MIME type.
Idem, it is within a line, not at the end of it.
> $ svn --help_
> Bash beeps, presumably because this script returns no results. It should
> recognise that there is exactly one completion, and so Bash should quietly
> append a space. The same occurs for any already-complete "-" or "--" option
> after a subcommand.
I can look into that. This case is a little particular because the first
argument is expected to be a subcommand, not an option.
>> + # commands which only expect two arguments
>> + # diff has some variant with two arguments, but not all of them.
>> + # merge/switch have two or three args variants.
>> + twoArgsCmds='copy|cp|move|mv|export|import'
> "move" also has aliases "ren" and "rename".
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Tue Nov 15 14:40:26 2005