[PATCH] Allow short options to stack, and take attached arguments
John A Meinel
john at arbash-meinel.com
Tue May 10 20:23:17 BST 2005
John A Meinel wrote:
...
> It would be nice if the option parser understood that some commands take
> arguments. So you can do "bzr diff -r444" rather than "bzr diff -r 444".
...
I thought it would be nice, so I added it. Patch is attached.
This basically allows the standard notation where multiple short options
can be given tacked together, and arguments can be attached to short
options.
Examples:
bzr command -x -y -z vs bzr command -xyz
bzr command -r 444 vs bzr command -r444
I am writing up some test cases, but it requires extra work for making
the test script a little bit better, look for multiple patches coming up.
I don't know if it was intentional, but the current code allows for
multi-character short options. I left that in, and I made them
preferentially tested versus single character options. So if we
implement "baz command -rest" it first tests for "rest" then for "-r".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shortopt.patch
Type: text/x-patch
Size: 1969 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050510/b33f8014/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050510/b33f8014/attachment.pgp
More information about the bazaar
mailing list