diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-05-16 23:03:08 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-05-16 23:03:08 -0400 |
commit | 35d25d5aa33324fa0fa3ce74f5af48d246fc5361 (patch) | |
tree | 6d90e20556a22d0b7320c4264f390f2a52e3a2bb | |
parent | 7e374ac3133b3547961e449bec1726178fc785d7 (diff) | |
download | cmd2-git-35d25d5aa33324fa0fa3ce74f5af48d246fc5361.tar.gz |
Updated docs
-rw-r--r-- | docs/argument_processing.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/argument_processing.rst b/docs/argument_processing.rst index 4d8adb5e..4bd917cf 100644 --- a/docs/argument_processing.rst +++ b/docs/argument_processing.rst @@ -275,7 +275,7 @@ Here's what it looks like:: ... -Using custom namespace with argument parser decorators +Using custom argparse.Namespace with argument parser decorators =============================================================================================== In some cases, it may be necessary to write custom ``argparse`` code that is dependent on state data of your application. To support this ability while still allowing use of the decorators, both ``@with_argparser`` and @@ -297,6 +297,9 @@ To use this function with the argparse decorators, do the following:: @with_argparser(my_parser, ns_provider=settings_ns_provider) +The Namespace is passed by the decorators to the ``argparse`` parsing functions which gives your custom code access +to the state data it needs for its parsing logic. + Sub-commands ============ Sub-commands are supported for commands using either the ``@with_argparser`` or |