summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
Commit message (Collapse)AuthorAgeFilesLines
* Stopping a shell command with Ctrl-C now raises a KeyboardInterrupt to ↵ctrl-cKevin Van Brunt2021-04-301-11/+48
| | | | | | 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-281-4/+5
| | | | pressed and instead run the next command in its list.
* Renamed silent_startup_script to silence_startup_script for clarityKevin Van Brunt2021-04-281-4/+4
|
* Updated main code to use f-stringsKevin Van Brunt2021-04-131-118/+89
|
* Add mypy validation actionEric Lin2021-04-061-1/+1
|
* And that's the last of it. Passes mypy.Eric Lin2021-04-061-17/+16
|
* history, py_bridge, transcript now passs mypyEric Lin2021-04-061-3/+3
|
* Command function formats defined and decorators.py updated with the defined ↵Eric Lin2021-04-061-0/+1
| | | | signatures
* More mypy fixesEric Lin2021-04-061-6/+8
|
* Replaced some pexcept() calls with perror().Kevin Van Brunt2021-04-021-30/+25
| | | | | | 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-021-15/+17
| | | | 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-021-49/+57
|
* More things to make mypy happy.Eric Lin2021-04-021-115/+135
|
* Changed History to use OrderDict to support Python 3.6 in non-CPython ↵Kevin Van Brunt2021-03-301-1/+2
| | | | environments.
* Renamed use_ipython keyword parameter of cmd2.Cmd.__init__() to include_ipy.Kevin Van Brunt2021-03-301-129/+102
| | | | | | | | | | 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-181-46/+106
|
* Added testsEric Lin2021-03-181-8/+13
|
* Each CommandSet's settables are defined separately. cmd2.Cmd searches all ↵Eric Lin2021-03-181-19/+40
| | | | | | | | 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
|
* Merge branch 'master' into formatted_completionsKevin Van Brunt2021-03-021-22/+20
|\
| * Merge branch 'master' into history_fixKevin Van Brunt2021-03-021-0/+5
| |\
| * | Fixed issue where HistoryItem indexes were being reusedKevin Van Brunt2021-02-231-22/+20
| | |
* | | Added support for ANSI styles and newlines in tab completion resultsKevin Van Brunt2021-03-021-60/+70
| |/ |/|
* | Added cmd2.exceptions.PassThroughExceptionexception_passthroughKevin Van Brunt2021-03-021-0/+5
|/
* Deprecate Python 3.5Todd Leonhardt2021-02-201-18/+18
|
* Fixed black, isort, flake8, and doc8 issuesTodd Leonhardt2021-02-191-78/+152
|
* Merge branch 'master' into blackTodd Leonhardt2021-02-191-316/+287
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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.0Todd Leonhardt2021-01-311-28/+29
| |\ | | | | | | | | | | | | # Conflicts: # CHANGELOG.md
| * \ Merge branch 'master' into 2.0Kevin Van Brunt2021-01-291-1/+7
| |\ \
| * \ \ Merge branch 'master' into 2.0Kevin Van Brunt2021-01-281-2/+7
| |\ \ \
| * | | | Removed --silent flag from alias/macro create since startup scripts can be ↵Kevin Van Brunt2021-01-221-30/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | run silently. Removed --with_silent flag from alias/macro list since startup scripts can be run silently.
| * | | | Merge branch 'master' into 2.0Kevin Van Brunt2021-01-221-17/+76
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into 2.0Todd Leonhardt2020-11-111-26/+79
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # CHANGELOG.md
| * \ \ \ \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-09-171-15/+44
| |\ \ \ \ \ \
| * | | | | | | Added section to completion docs about read_input() functionKevin Van Brunt2020-09-091-0/+1
| | | | | | | |
| * | | | | | | Moved two classes from cmd2.py to utils.py.Kevin Van Brunt2020-09-091-44/+10
| | | | | | | |
| * | | | | | | Merge branch '2.0' into read_inputKevin Van Brunt2020-09-091-2/+1
| |\ \ \ \ \ \ \
| | * \ \ \ \ \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-09-091-2/+1
| | |\ \ \ \ \ \ \
| * | | | | | | | | Made CustomCompletionSettings public since it's optionally passed to public ↵Kevin Van Brunt2020-09-051-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | method cmd2.Cmd.complete().
| * | | | | | | | | Added pragma: no cover to some tab completion codeKevin Van Brunt2020-09-051-7/+5
| | | | | | | | | |
| * | | | | | | | | Updated unit tests for read_input()Kevin Van Brunt2020-09-051-2/+5
| | | | | | | | | |
| * | | | | | | | | Merge branch '2.0' into read_inputKevin Van Brunt2020-09-051-14/+35
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / /