diff options
author | 2022-12-09 15:30:32 +0200 | |
---|---|---|
committer | 2022-12-09 15:30:32 +0200 | |
commit | 3e9c92ef1ea53b15974c730e5709ccb08a309dea (patch) | |
tree | d3106d81601a41ece41d1b6316cfe509b9d6a44a | |
parent | generate_man_rsts: improve sub sectioning for sub commands (diff) | |
download | snakeoil-3e9c92ef1ea53b15974c730e5709ccb08a309dea.tar.gz snakeoil-3e9c92ef1ea53b15974c730e5709ccb08a309dea.tar.bz2 snakeoil-3e9c92ef1ea53b15974c730e5709ccb08a309dea.zip |
generate_man_rsts: better formatting for options
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | src/snakeoil/dist/generate_man_rsts.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/snakeoil/dist/generate_man_rsts.py b/src/snakeoil/dist/generate_man_rsts.py index 6c482211..ca20b360 100644 --- a/src/snakeoil/dist/generate_man_rsts.py +++ b/src/snakeoil/dist/generate_man_rsts.py @@ -34,6 +34,10 @@ class RawTextFormatter(argparse.RawTextHelpFormatter): action.help = '\n' + action.help.strip() return super()._format_action(action) + def _format_action_invocation(self, action): + text = super()._format_action_invocation(action) + return f':option:`{text}`' + class ManConverter: """Convert argparse help docs into rST man pages.""" |