[issue39106] Add suggestions to argparse error message output for unrecognized arguments
hai shi
report at bugs.python.org
Wed Dec 25 09:08:21 EST 2019
hai shi <shihai1991 at 126.com> added the comment:
I checked some other common clis and it is show all right available options too. So I thought the argparse's help function is good enough too ;)
```
$ ps -etest
error: TTY could not be found
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
```
```
$ top test
top: unknown option 't'
Usage:
top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols]
```
----------
nosy: +shihai1991
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39106>
_______________________________________
More information about the Python-bugs-list
mailing list