summaryrefslogtreecommitdiff
path: root/cmd2
Commit message (Collapse)AuthorAgeFilesLines
* Updated documentation for setting custom parserscustom_command_completerKevin Van Brunt2021-08-231-1/+4
|
* Applied black formatEric Lin2021-08-233-7/+12
|
* * New function `set_default_command_completer_type()` allows developer to ↵Eric Lin2021-08-196-40/+169
| | | | | | | | | 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.
* Deleted set_choices_provider() and set_completer() which were deprecated in ↵Kevin Van Brunt2021-08-191-25/+0
| | | | 2.1.2
* Added accessor methods for cmd2-specific attributes to the argparse.Action ↵Kevin Van Brunt2021-07-042-60/+273
| | | | | | class. Deprecated set_choices_provider() and set_completer() functions in favor of these new methods.
* Updated all examples to use Cmd2ArgumentParser instead of ↵Kevin Van Brunt2021-06-171-2/+2
| | | | | | argparse.ArgumentParser. This is best practice for consistency of appearance between built-in and custom commands.
* Fixing tests on Python 3.10Kevin Van Brunt2021-06-171-1/+1
|
* Fixed handling of argparse's default options group name which was changed in ↵Kevin Van Brunt2021-06-172-4/+10
| | | | Python 3.10
* Updated error message when invalid persistent history file is readKevin Van Brunt2021-06-141-1/+4
|
* Sorted exception listKevin Van Brunt2021-06-141-1/+1
|
* Compressing JSON history filesKevin Van Brunt2021-06-141-9/+14
|
* Converted persistent history files from pickle to JSON formatKevin Van Brunt2021-06-143-30/+107
|
* Updated documentation. Added support for calling cmd2.Cmd.run_editor() with ↵Kevin Van Brunt2021-05-251-2/+2
| | | | no argument.
* Merge branch 'master' into make-run_editor-publicTodd Leonhardt2021-05-241-5/+10
|\
| * do_eof() now just calls the quit functionKevin Van Brunt2021-05-171-5/+10
| |
* | Make _run_editor() publicSimon J. Rowe2021-05-141-3/+3
|/
* Removed cmd2.Cmd.quit_on_sigint.Kevin Van Brunt2021-04-301-14/+7
|
* Stopping a shell command with Ctrl-C now raises a KeyboardInterrupt to ↵Kevin Van Brunt2021-04-302-15/+52
| | | | | | support stopping a text script which ran the shell command. On POSIX systems, shell commands and processes being piped to are now run in the user's preferred shell instead of /bin/sh.
* Changed default behavior of runcmds_plus_hooks() to not stop when Ctrl-C is ↵Kevin Van Brunt2021-04-301-4/+5
| | | | pressed and instead run the next command in its list.
* Added handling for OSError caused by trying to load a GNU readline shared ↵Kevin Van Brunt2021-04-281-2/+2
| | | | | | library in Python environments like PyPy which have a pure Python implementation of readline.
* Renamed silent_startup_script to silence_startup_script for clarityKevin Van Brunt2021-04-281-4/+4
|
* Made the amount of space between columns in a SimpleTable configurablecolumn_spacingKevin Van Brunt2021-04-211-11/+19
|
* Fixed typo in docstringKevin Van Brunt2021-04-211-1/+1
|
* Updated main code to use f-stringsKevin Van Brunt2021-04-138-159/+122
|
* Add mypy validation actionEric Lin2021-04-062-2/+2
|
* And that's the last of it. Passes mypy.Eric Lin2021-04-0610-74/+118
|
* history, py_bridge, transcript now passs mypyEric Lin2021-04-064-37/+48
|
* Command function formats defined and decorators.py updated with the defined ↵Eric Lin2021-04-062-22/+71
| | | | signatures
* More mypy fixesEric Lin2021-04-065-51/+81
|
* Replaced some pexcept() calls with perror().Kevin Van Brunt2021-04-022-31/+26
| | | | | | Converted some strings to f-strings. Fixed some grammar in error messages and docs. Increased code coverage.
* Refactored _perform_completion() to remove need for a cast() callKevin Van Brunt2021-04-022-19/+20
| | | | Changed CommandResult.stderr to a str instead of Optional[str]
* More mypy validation changes. cmd2.py is nearly fully mypy compliant now.Eric Lin2021-04-027-69/+91
|
* More things to make mypy happy.Eric Lin2021-04-028-174/+239
|
* MyPy strict checking doesn't allow implicit exports. Must explicitly export ↵Eric Lin2021-04-021-0/+41
| | | | in __init__.py
* Changed History to use OrderDict to support Python 3.6 in non-CPython ↵Kevin Van Brunt2021-03-302-7/+10
| | | | environments.
* Renamed use_ipython keyword parameter of cmd2.Cmd.__init__() to include_ipy.Kevin Van Brunt2021-03-302-150/+113
| | | | | | | | | | 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 type hintsipy_localsKevin Van Brunt2021-03-251-5/+2
|
* Removed ipy's access to the CLI's globals() dictionaryKevin Van Brunt2021-03-241-26/+29
|
* ipy command now includes all of self.py_locals in the IPython environmentKevin Van Brunt2021-03-241-25/+30
|
* No longer using -1 as an exit codeexit_codeKevin Van Brunt2021-03-231-2/+2
|
* onecmd_plus_hooks() now sets self.exit_code when a SystemExit handledKevin Van Brunt2021-03-231-2/+4
|
* Updating commentEric Lin2021-03-231-1/+1
|
* Updated out of date commentEric Lin2021-03-231-1/+1
|
* Resolves comments from PREric Lin2021-03-185-105/+269
|
* Some mypy validation fixesEric Lin2021-03-187-109/+120
|
* Added testsEric Lin2021-03-181-8/+13
|
* Each CommandSet's settables are defined separately. cmd2.Cmd searches all ↵Eric Lin2021-03-183-21/+113
| | | | | | | | registered CommandSets for settables. Settables can now set any attribute on any object passed to it. The name the user sees may be set to a different value than what the actual attribute is. Cmd2 will now aggregate all settables on the cmd2.Cmd instance with each installed CommandSet.
* Corrected help text for alias commandKevin Van Brunt2021-03-181-1/+1
|
* Updated commentsKevin Van Brunt2021-03-031-6/+7
|
* Fixed issue where argparse choices could not be CompletionItemsKevin Van Brunt2021-03-021-2/+5
|