From 67c18b088acb28b0ff946925c94598fcf8ea634c Mon Sep 17 00:00:00 2001 From: Kyle King Date: Sun, 8 Nov 2020 20:10:41 -0500 Subject: Replace with_argparser_and_unknown_args in docs --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 8bb8b930..946e2d1f 100755 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.1