Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed example code | Kevin Van Brunt | 2021-09-07 | 1 | -2/+5 |
| | |||||
* | Refactored custom ArgparseCompleter functionality so they will now be set ↵ | Kevin Van Brunt | 2021-09-01 | 2 | -3/+3 |
| | | | | | | using methods on ArgumentParser objects. This fixes issue where subcommands did not use the correct custom ArgparseCompleter type. | ||||
* | Updated documentation for setting custom parsers | Kevin Van Brunt | 2021-08-23 | 2 | -2/+4 |
| | |||||
* | * New function `set_default_command_completer_type()` allows developer to ↵ | Eric Lin | 2021-08-23 | 1 | -3/+2 |
| | | | | | | | | | extend and modify the behavior of `ArgparseCompleter`. * New function `register_argparse_argument_parameter()` allows developers to specify custom parameters to be passed to the argparse parser's `add_argument()` method. These parameters will become accessible in the resulting argparse Action object when modifying `ArgparseCompleter` behavior. | ||||
* | Fixed spelling in docstring | Kevin Van Brunt | 2021-06-28 | 1 | -1/+1 |
| | |||||
* | Updated all examples to use Cmd2ArgumentParser instead of ↵ | Kevin Van Brunt | 2021-06-17 | 11 | -26/+18 |
| | | | | | | argparse.ArgumentParser. This is best practice for consistency of appearance between built-in and custom commands. | ||||
* | Style changes from running black on Python 3.9 | Kevin Van Brunt | 2021-04-27 | 13 | -19/+19 |
| | |||||
* | Renamed use_ipython keyword parameter of cmd2.Cmd.__init__() to include_ipy. | Kevin Van Brunt | 2021-03-30 | 12 | -22/+17 |
| | | | | | | | | | | Added include_py keyword parameter to cmd2.Cmd.__init__(). If False, then the py command will not be available. Removed ability to run Python commands from the command line with py. Made banners and exit messages of Python and IPython consistent. Changed utils.is_text_file() to raise OSError if file cannot be read. | ||||
* | Fixed colors example code | Kevin Van Brunt | 2021-03-23 | 1 | -4/+4 |
| | |||||
* | No longer using -1 as an exit codeexit_code | Kevin Van Brunt | 2021-03-23 | 2 | -2/+2 |
| | |||||
* | Resolves comments from PR | Eric Lin | 2021-03-18 | 9 | -12/+14 |
| | |||||
* | Updated tab completion example | Kevin Van Brunt | 2021-03-02 | 1 | -3/+4 |
| | |||||
* | Fixed black, isort, flake8, and doc8 issues | Todd Leonhardt | 2021-02-19 | 4 | -46/+61 |
| | |||||
* | Merge branch 'master' into black | Todd Leonhardt | 2021-02-19 | 7 | -188/+187 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # cmd2/__init__.py # cmd2/argparse_completer.py # cmd2/argparse_custom.py # cmd2/cmd2.py # cmd2/decorators.py # cmd2/exceptions.py # cmd2/utils.py # examples/arg_decorators.py # examples/argparse_completion.py # examples/modular_commands_main.py # tests/test_argparse_completer.py # tests/test_argparse_custom.py # tests/test_cmd2.py # tests/test_completion.py # tests/test_history.py | ||||
| * | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2021-01-22 | 28 | -44/+168 |
| |\ | |||||
| * \ | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-09-17 | 1 | -0/+80 |
| |\ \ | |||||
| * \ \ | Merge branch '2.0' into read_input | Kevin Van Brunt | 2020-09-05 | 1 | -0/+1 |
| |\ \ \ | |||||
| | * \ \ | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-09-05 | 1 | -0/+1 |
| | |\ \ \ | |||||
| * | \ \ \ | Merge branch '2.0' into read_input | Kevin Van Brunt | 2020-09-03 | 3 | -6/+6 |
| |\ \ \ \ \ | | |/ / / / | |||||
| | * | | | | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-09-03 | 3 | -6/+6 |
| | |\ \ \ \ | |||||
| * | | | | | | Updated read_input example | Kevin Van Brunt | 2020-09-01 | 1 | -10/+33 |
| | | | | | | | |||||
| * | | | | | | Added read_input() example | Kevin Van Brunt | 2020-09-01 | 1 | -0/+89 |
| |/ / / / / | |||||
| * | | | | | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-08-28 | 1 | -2/+2 |
| |\ \ \ \ \ | |||||
| * \ \ \ \ \ | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-08-27 | 2 | -2/+2 |
| |\ \ \ \ \ \ | |||||
| * \ \ \ \ \ \ | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-08-25 | 1 | -1/+1 |
| |\ \ \ \ \ \ \ | |||||
| * | | | | | | | | Updated async printing example to use thread event instead of a boolean flag | Kevin Van Brunt | 2020-08-18 | 1 | -7/+7 |
| | | | | | | | | | |||||
| * | | | | | | | | Replaced choices_function / choices_method with choices_provider. | Kevin Van Brunt | 2020-08-13 | 5 | -149/+53 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced completer_function / completer_method with completer. ArgparseCompleter now always passes cmd2.Cmd or CommandSet instance as the self argument to choices_provider and completer functions. Moved basic_complete from utils into cmd2.Cmd class. Moved CompletionError to exceptions.py | ||||
* | | | | | | | | | Add in isort changes | Todd Leonhardt | 2021-01-31 | 17 | -24/+69 |
| | | | | | | | | | |||||
* | | | | | | | | | Attempt to fix remaining black failures | Todd Leonhardt | 2021-01-31 | 2 | -6/+5 |
| | | | | | | | | | |||||
* | | | | | | | | | Add black for automatic code format | Todd Leonhardt | 2021-01-31 | 37 | -269/+253 |
| |_|_|_|_|_|_|/ |/| | | | | | | | |||||
* | | | | | | | | Changed isort to force wrapping of imports to reduce merge conflicts from ↵ | Eric Lin | 2021-01-22 | 28 | -48/+183 |
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | minor import changes. | ||||
* | | | | | | | Changes default category to be heritable by default - meaning that ↵ | Eric Lin | 2020-09-11 | 1 | -0/+80 |
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subclasses will inherit the parent class's default category. Adds optional flag to disable heritability. | ||||
* | | | | | | Added always_show_hint setting | Kevin Van Brunt | 2020-09-05 | 1 | -0/+1 |
| |_|_|_|/ |/| | | | | | | | | | | | | | | Fixed issue where flag names weren't always sorted correctly in argparse tab completion | ||||
* | | | | | Fixed type hints in example code1.3.9 | Kevin Van Brunt | 2020-09-03 | 1 | -1/+1 |
| | | | | | |||||
* | | | | | Updated docs | Kevin Van Brunt | 2020-09-01 | 3 | -5/+5 |
| |_|_|/ |/| | | | |||||
* | | | | Fixed issue where subcommand added with @as_subcommand_to decorator did not ↵ | Kevin Van Brunt | 2020-08-27 | 1 | -2/+2 |
| |_|/ |/| | | | | | | | | | | | | | | display help when called with -h/--help. 'add_help=False' no longer has to be passed to parsers used in @as_subcommand_to decorator. | ||||
* | | | The functions cmd2 adds to Namespaces (get_statement() and get_handler()) ↵ | Kevin Van Brunt | 2020-08-26 | 2 | -2/+2 |
| |/ |/| | | | | | | | | | | | are now Cmd2AttributeWrapper objects named cmd2_statement and cmd2_handler. This makes it easy to filter out which attributes in an argparse.Namespace were added by cmd2. | ||||
* | | Fixed RecursionError when printing an argparse.Namespace caused by custom ↵ | Kevin Van Brunt | 2020-08-25 | 1 | -1/+1 |
|/ | | | | | | attribute cmd2 was adding Added get_statement() function to argparse.Namespace which returns __statement__ attribute | ||||
* | Breaking change: Removed cmd2 app as a required second parameter to | Eric Lin | 2020-08-12 | 6 | -51/+51 |
| | | | | | | CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set. | ||||
* | Minor housekeeping. Updated CODEOWNERS with recent additions | Eric Lin | 2020-08-07 | 1 | -1/+1 |
| | |||||
* | Moved code which copies subparser's settings to _register_subcommands(). | Kevin Van Brunt | 2020-08-07 | 1 | -5/+7 |
| | | | | | Changed alias and macro commands to use as_subcommand_to() decorator. Updated CommandSet subcommand example to use help and description text. | ||||
* | Removed obsolete argument1.3.0 | Kevin Van Brunt | 2020-08-04 | 1 | -1/+1 |
| | |||||
* | Marked with_arparser_and_unknown_args deprecated and consolidated | Eric Lin | 2020-08-04 | 3 | -3/+3 |
| | | | | implementation as an option to with_argparser instead. | ||||
* | Minor formatting fixes. Injecting a function into namespace objects before ↵ | Eric Lin | 2020-08-04 | 1 | -3/+3 |
| | | | | passing to command handlers to access sub-command handlers | ||||
* | Suggested PR Fixes. | Eric Lin | 2020-08-04 | 1 | -3/+3 |
| | | | | | sub-commande => subcommand Added help/aliases to `as_subcommand_to` decorator. | ||||
* | Adds support for injectable subcommands as part of CommandSet | Eric Lin | 2020-08-04 | 1 | -0/+110 |
| | | | | | | load/unload. Updated examples and documentation to include discussion of injectable sub-commands. | ||||
* | updated imports | Eric Lin | 2020-08-04 | 5 | -5/+128 |
| | | | | Added additional documentation | ||||
* | Updates the example to remove usage of the now remove ability to | Eric Lin | 2020-08-04 | 4 | -43/+56 |
| | | | | | | | | | | register arbitrary functions as commands. Added example that demonstrates use of each of the command decorators with CommandSets. Adds unit test that verifies that CommandSets containing decorators load and process commands correctly. Updated the constructor declaration for Cmd2ArgumentParser to explicitly re-declare argparse constructor parameters. | ||||
* | cleanup | Eric Lin | 2020-08-04 | 1 | -7/+7 |
| | |||||
* | Sort imports using isort | Todd Leonhardt | 2020-08-04 | 2 | -2/+2 |
| |