diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-02-19 17:45:53 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-02-19 17:49:16 +0200 |
commit | 8df6c12990a3b45dab78fe80b0140b13e969845f (patch) | |
tree | 670fc9b4db894fb30cfce86a881d6948f321dc0c | |
parent | 8ffd7e0e41397b1ee5997877887c14db4411d13b (diff) | |
download | cliapp-8df6c12990a3b45dab78fe80b0140b13e969845f.tar.gz |
Unhide hidden options
This reveals --dump-config-names, --list-config-files, and
--generate-manpage in --help output. There's no point in keeping them
hidden, especially the first two.
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | cliapp/settings.py | 8 |
2 files changed, 12 insertions, 4 deletions
@@ -1,6 +1,14 @@ NEWS for cliapp =============== +Version 1.20151108+git, not yet released +--------------------------------------- + +* The `--help` now shows the previously hidden options + `--dump-config-names`, `--list-config-files`, and + `--generate-manpage`. These are not frequently used, but sometimes + they are useful, and there's no point making them difficult to find. + Version 1.20151108, released 2016-01-09 --------------------------------------- diff --git a/cliapp/settings.py b/cliapp/settings.py index f05f11e..e281099 100644 --- a/cliapp/settings.py +++ b/cliapp/settings.py @@ -524,7 +524,7 @@ class Settings(object): # Return help text, unless setting/option is hidden, in which # case return optparse.SUPPRESS_HELP. - def help_text(text, hidden): + def help_text(text, hidden): # pragma: no cover if all_options or not hidden: return text else: @@ -543,7 +543,7 @@ class Settings(object): action='callback', nargs=0, callback=defer_last(maybe(dump_setting_names)), - help=help_text('write out all names of settings and quit', True)) + help=help_text('write out all names of settings and quit', False)) # Add --dump-config. @@ -602,7 +602,7 @@ class Settings(object): action='callback', nargs=0, callback=defer_last(maybe(list_config_files)), - help=help_text('list all possible config files', True)) + help=help_text('list all possible config files', False)) # Add --generate-manpage. @@ -615,7 +615,7 @@ class Settings(object): nargs=1, type='string', callback=maybe(self._generate_manpage), - help=help_text('fill in manual page TEMPLATE', True), + help=help_text('fill in manual page TEMPLATE', False), metavar='TEMPLATE') # Add --help-all. |