[PATCH]: shell-complete command
schizo at debian.org
Tue Aug 23 04:01:17 BST 2005
> I'd suggest another dictionary, something like OPTION_ARGS. Neat thing
> is, if an option does take an argument but a name is not given in
> OPTION_ARGS, you can use some default. (Maybe the option name?)
If there's going to be a 1:1 correspondence between option name and
argument type, a dictionary for that would be redundant. That doesn't
allow the granularity to say, "branch -r" takes a single revision,
"diff -r" can take a range, and "merge -r" can take a pair. In this
case, the real value is in presenting a description to a human;
autocompleting integers is a bit silly.
I'm more worried about things like --format and --root; are they always
going to take the same potential arguments regardless of subcommand?
If so, this can be done more easily.
More information about the bazaar