Dean Troyer (dtro...@gmail.com) wrote: > On Mon, Apr 30, 2012 at 2:19 PM, Dolph Mathews <dolph.math...@gmail.com> > wrote: > > I find this behavior really annoying... --help should be contextual > > (depending on whether a subcommand is present, and what it is). > > > I hope not... +1 for argparse. > > Actually, argparse is one reason for this behaviour. It doesn't like > duplicated options in subparsers, nor subsets of names like we found > in keystone with --tenant and --tenant_id, etc. IIRC none of the > existing clients do that, they all rely on 'help command' to get > command-specific help.
As of my recent patch, --help is contextual in nova: https://review.openstack.org/6460 and I have started work on some of the other commands too, so it would be helpful if we could reach a consensus on this soon ... although please let me know if I am wasting my time working on other commands due to any imminent rewrites using python-openstack! I agree with Dolph - there is a precedent from other well-known programs (git, hg, svn are the first ones I can think of) for --help to behave differently depending on whether or not it was preceded by a subcommand. So my vote is that we should definitely aim to adhere to this pattern. _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp