summaryrefslogtreecommitdiff
path: root/docs/argument_processing.rst
Commit message (Collapse)AuthorAgeFilesLines
* Minor doc updates that fix a few typos and inaccuraciesTodd Leonhardt2019-02-061-2/+3
|
* Removed a few unecessary newlinesTodd Leonhardt2018-10-261-3/+0
|
* Improved documentation for argument parsing decoratorsTodd Leonhardt2018-10-261-0/+17
| | | | | Also: - Improved type hinting for these decorators
* Added warning to documentation about how help_foo won't be called for ↵Todd Leonhardt2018-10-061-2/+10
| | | | | | | command foo if it uses an argparse decorator Also: - Renamed argparse_example.py to decorator_example.py
* Added documentation stating that parsers passed to argparse decorators need ↵Todd Leonhardt2018-10-061-2/+14
| | | | | | | to be unique Also: - Modified table_display.py to demonstrate a workaround
* Docstring updatesKevin Van Brunt2018-09-091-6/+6
|
* Added/updated documentation for `Statement`kotfu2018-09-091-1/+30
|
* Deprecated CmdResult helper class and promoted CommandResultTodd Leonhardt2018-06-231-1/+1
| | | | | | | | | | | | | | These classes are subtly different, particularly in terms of their truthiness. CmdResult - attributes: out, err, war - truthy: if err is falsy CommandResult - attributes: stdout, stderr, data - truthy: if err is falsy AND data is not None So CmdResult was oriented to provide essentially info, error, and warning messages to the user (typically as stirngs), whereas CommandResult is geared towards providing info and error messages to the user as strings in addition to data to the user in a command-specific format which is arbitrary other than it should never be None if the command succeeds.
* Added some documentation related to the latest changes.Eric Lin2018-04-211-6/+4
|
* Merge branch 'master' into delete_optparseTodd Leonhardt2018-04-111-0/+132
|\ | | | | | | | | # Conflicts: # cmd2.py
| * 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.
* | Deleted optparse code which had been previously deprecated in 0.8.0 releaseTodd Leonhardt2018-04-091-39/+0
|/ | | | | Also: - Bumped version to 0.8.4
* 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