diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-06-12 20:59:50 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-06-12 20:59:50 +0100 |
commit | 5469f2aa29d641e9dc0edb22e77066847c7ed17a (patch) | |
tree | 2803bd5d78d62ef6ca849b869702c346d6c60da0 /docs | |
parent | 34e7e6c73035f8e4fe309075e0813ac48517d610 (diff) |
doc: do not list all possible choices for boolean
.. command parameters. BooleanAction type
argparse parameters allow y/n, true/false etc.. don't list all possibilities in the docs
Diffstat (limited to 'docs')
-rwxr-xr-x | docs/source/generate_commands.py | 3 | ||||
-rw-r--r-- | docs/source/usage/modes/envelope.rst | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/source/generate_commands.py b/docs/source/generate_commands.py index 97c50cd2..eb241d10 100755 --- a/docs/source/generate_commands.py +++ b/docs/source/generate_commands.py @@ -6,6 +6,7 @@ from alot.commands import * from alot.commands import COMMANDS import alot.buffers from argparse import HelpFormatter, SUPPRESS, OPTIONAL, ZERO_OR_MORE, ONE_OR_MORE, PARSER, REMAINDER +from alot.utils.booleanaction import BooleanAction from gettext import gettext as _ import collections as _collections import copy as _copy @@ -84,7 +85,7 @@ def rstify_parser(parser): for a in parser._optionals._group_actions: switches = [s.replace('--','---') for s in a.option_strings] out += "\t:%s: %s" % (', '.join(switches), a.help) - if a.choices: + if a.choices and not isinstance(a, BooleanAction): out += ". Valid choices are: %s" % ','.join(['\`%s\`' % s for s in a.choices]) if a.default: diff --git a/docs/source/usage/modes/envelope.rst b/docs/source/usage/modes/envelope.rst index be3b79f1..3422e6e5 100644 --- a/docs/source/usage/modes/envelope.rst +++ b/docs/source/usage/modes/envelope.rst @@ -51,8 +51,8 @@ ____ edit mail optional arguments - :---spawn: force spawning of editor in a new terminal. - :---no-refocus: don't refocus envelope after editing (Defaults to: 'True'). + :---spawn: spawn editor in new terminal. + :---refocus: refocus envelope after editing (Defaults to: 'True'). .. _cmd_envelope_send: .. index:: send |