summaryrefslogtreecommitdiff
path: root/docs/argument_processing.rst
Commit message (Collapse)AuthorAgeFilesLines
* Added a with_category decorator that can be used to tag a command category.Eric Lin2018-04-111-0/+132
| | | | | | | | | Changed the detection of with_argparse decorated commands to be less hacky/brittle. Now it tags the function with help_summary. Fixed issue with handling commands that provide a custom help_ function. We can now redirect the output to a string to be formatted with the other commands. Added some documentation explaining the new help categories. Updated unit tests.
* Documented cmd_with_subs_completer functionKevin Van Brunt2018-03-161-0/+6
|
* Improved argument processing docsTodd Leonhardt2018-02-011-14/+38
| | | | | | | | Improved the documentation related to how to use the argparse decorators. Also: - Fixed a comment in cmd2.py which referred to the old decorator before the rename - Fixed README.md which had the old decorator name in it prior to the rename
* Renamed @with_argument_parser decorator to @with_argparserTodd Leonhardt2018-01-211-9/+9
| | | | | Also: - Reanamed foo and bar subcommand methods to base_foo and base_bar
* Added unit tests for newly-overridden complete() methodTodd Leonhardt2018-01-201-2/+11
| | | | Also added a section on Sub-commands to the documentation.
* Simplified a few argparse examples and fixed some incorrect documentationTodd Leonhardt2018-01-171-10/+12
| | | | | | I eliminated a few "narg=1" configurations so that a single str value is returned instead of a List[str]. I also reworded some documentation which was no longer correct after the last commit which made "history command" have the same help text as "command -h" when using one of the two argparse decorators.
* Revised some of the Sphinx documentation which referenced the deprecated ↵Todd Leonhardt2018-01-151-0/+2
| | | | @options optparse-based decorator
* Changed @with_argument_parser to only pass single argument to commandsTodd Leonhardt2018-01-151-10/+33
| | | | Also added another @with_argparser_and_list decorator that uses argparse.parse_known_args to pass two arguments to a command: both the argparse output and a list of unknown/unmatched args.
* remove use_argument_list attributekotfu2018-01-141-33/+1
|
* new @with_argument_list decoratorkotfu2018-01-121-0/+51
|
* @with_argument_parser now passes an arglist instead of a stringkotfu2018-01-121-5/+8
|
* Trivial doc change to get readthedocs to rebuildTodd Leonhardt2018-01-101-2/+3
|
* Write documentationkotfu2018-01-071-112/+146
|
* Plan and first working code for argparse decoratorJared Crapo2017-12-111-0/+141