[New-bugs-announce] [issue45275] Make argparse print description of subcommand when invoke help doc on subcommand

Chuanlong Du report at bugs.python.org
Fri Sep 24 00:32:20 EDT 2021


New submission from Chuanlong Du <longendu at gmail.com>:

I have command-line script `blog` written using argparse. It supports subcommands. When I check the help doc of a subcommand, e.g., using `blog convert -h`, it prints the help doc of the subcommand `blog convert` but doesn't print the description of the subcommand `blog convert`. A screenshot is attached. It is quite often that I know a command-line application have certain subcommands but I forget exactly what they do. It would be very helpful if `blog subcmd -h` prints the description of the subcmd so that users do not have to call `blog -h` again to check exactly what the subcommand does.

----------
components: Library (Lib)
files: Selection_011.png
messages: 402541
nosy: longendu
priority: normal
severity: normal
status: open
title: Make argparse print description of subcommand when invoke help doc on subcommand
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50301/Selection_011.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45275>
_______________________________________


More information about the New-bugs-announce mailing list