diff options
author | Kyle King <KyleKing@users.noreply.github.com> | 2020-11-08 20:10:41 -0500 |
---|---|---|
committer | Kyle King <KyleKing@users.noreply.github.com> | 2020-11-08 20:10:41 -0500 |
commit | 67c18b088acb28b0ff946925c94598fcf8ea634c (patch) | |
tree | 0880f7834861ab0aa95f6d8d5a0d9a1f72c0cc4d /README.md | |
parent | d4436244b1bdfc38d611545795f5759818e94847 (diff) | |
download | cmd2-git-67c18b088acb28b0ff946925c94598fcf8ea634c.tar.gz |
Replace with_argparser_and_unknown_args in docs
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -123,9 +123,8 @@ Instructions for implementing each feature follow. example in conjunction with the [conditional.py](https://github.com/python-cmd2/cmd2/blob/master/examples/scripts/conditional.py) script - Parsing commands with `argparse` - - Two decorators provide built-in capability for using `argparse.ArgumentParser` to parse command arguments - - `cmd2.with_argparser` - all arguments are parsed by the `ArgumentParser` - - `cmd2.with_argparser_and_unknown_args` - any arguments not parsed by the `ArgumentParser` get passed as a list + - The built-in `cmd2.with_argparser` decorator will parse arguments using `argparse.ArgumentParser` + - Optionally, `cmd2.with_argparser(.., with_unknown_args=True)` can be used to pass all unknown arguments as a list ```Python import argparse |