deb-python-cliff/cliff
Sean Perry 5d5aeb2f99 Allow subcommands to accept --help when using 'deferred_help'.
This patch changes how cliff handles help for subcommands but only when
'deferred_help' is enabled. Currently cliff consumes --help requests at the top
level. This means `myapp foo --help` and `myapp --help` produce the same output.
To get help for `foo` one must use `myapp help foo`. With this change
`myapp foo --help` will produce the same output as `myapp help foo` by
transforming the --help request into a help subcommand one. This is only done
when there are any options on the command line other than --help. When a top
level --help is requested the original behavior of print_help_if_requested()
is preserved.

Change-Id: I628bbfc383de516045288512cc023213d723a027
Closes-Bug: 1444983
2015-07-14 10:05:23 -07:00
..
formatters Add value format for list command 2015-05-26 10:18:21 -06:00
tests Allow subcommands to accept --help when using 'deferred_help'. 2015-07-14 10:05:23 -07:00
__init__.py add setup.py and package directory 2012-04-20 09:52:55 -07:00
app.py Allow subcommands to accept --help when using 'deferred_help'. 2015-07-14 10:05:23 -07:00
command.py Pass user command text to the Command object 2015-03-06 12:28:04 -06:00
commandmanager.py Do not check requirements when loading plugins 2015-04-22 00:58:45 +00:00
complete.py use entry points for completion plugins 2013-11-12 18:14:37 -05:00
display.py Pass user command text to the Command object 2015-03-06 12:28:04 -06:00
help.py Merge "Print help on help command" 2015-06-03 20:58:34 +00:00
interactive.py Merge "Correct completion in interactive mode" 2015-03-04 02:59:54 +00:00
lister.py Merge "Use six.add_metaclass instead of __metaclass__" 2014-06-09 15:11:34 +00:00
show.py Merge "Use six.add_metaclass instead of __metaclass__" 2014-06-09 15:11:34 +00:00