summaryrefslogtreecommitdiff
path: root/cmd2/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Resolves comments from PRcmdset_settablesEric Lin2021-03-181-13/+35
|
* Some mypy validation fixesEric Lin2021-03-181-54/+31
|
* Each CommandSet's settables are defined separately. cmd2.Cmd searches all ↵Eric Lin2021-03-181-2/+33
| | | | | | | | 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.
* Fix error in Python 3.6Todd Leonhardt2021-02-211-2/+1
|
* Start making small changes to fix mypy warningsTodd Leonhardt2021-02-211-4/+16
|
* Deprecate Python 3.5Todd Leonhardt2021-02-201-6/+1
|
* Fixed black, isort, flake8, and doc8 issuesTodd Leonhardt2021-02-191-5/+14
|
* Merge branch 'master' into blackTodd Leonhardt2021-02-191-71/+44
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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.0Kevin Van Brunt2021-01-221-29/+41
| |\
| * \ Merge branch 'master' into 2.0Todd Leonhardt2020-11-211-21/+20
| |\ \
| * \ \ Merge branch 'master' into 2.0Todd Leonhardt2020-11-111-9/+21
| |\ \ \ | | | | | | | | | | | | | | | | | | | | # Conflicts: # CHANGELOG.md
| * \ \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-09-171-8/+18
| |\ \ \ \
| * | | | | Moved two classes from cmd2.py to utils.py.Kevin Van Brunt2020-09-091-2/+37
| | | | | |
| * | | | | Documented support for standalone functions being used as completers and ↵Kevin Van Brunt2020-08-181-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | choices_providers. Added unit tests for this case.
| * | | | | Replaced choices_function / choices_method with choices_provider.Kevin Van Brunt2020-08-131-55/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 changesTodd Leonhardt2021-01-311-5/+16
| | | | | |
* | | | | | Add black for automatic code formatTodd Leonhardt2021-01-311-45/+62
| |_|_|_|/ |/| | | |
* | | | | Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-5/+19
| | | | | | | | | | | | | | | | | | | | minor import changes.
* | | | | Update editor list for Linux/Mac - add joe and change order of various ↵Todd Leonhardt2020-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | graphical editors
* | | | | Updated utils.find_editor() to include more Windows editorsKevin Van Brunt2020-11-191-22/+20
| |_|_|/ |/| | |
* | | | feat(utils): probe editors in system pathMikhail Ushanov2020-11-171-21/+20
| |_|/ |/| | | | | | | | Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
* | | Fixed issue where quoted redirectors and terminators in aliases and macros ↵Kevin Van Brunt2020-09-301-9/+21
| |/ |/| | | | | | | | | were not being restored when read from a startup script.
* | Minor type hinting fixes.Eric Lin2020-09-111-7/+14
| |
* | Changes default category to be heritable by default - meaning that ↵Eric Lin2020-09-111-1/+4
|/ | | | | | subclasses will inherit the parent class's default category. Adds optional flag to disable heritability.
* Minor fixes to enable Python 3.5.2 supportEric Lin2020-08-111-2/+7
|
* Verify that a completer function is defined in a CommandSet beforeEric Lin2020-08-061-1/+30
| | | | | | | | | | passing it a CommandSet instance. Search for a CommandSet instance that matches the completer's parent class type.` Resolves Issue #967 Renamed isolated_tests directory to tests_isolated for better visual grouping. Added some exception documentation
* Documented CompletionError classKevin Van Brunt2020-04-231-4/+4
|
* Updated docsKevin Van Brunt2020-04-221-9/+10
|
* Merge branch 'master' into table_creatorTodd Leonhardt2020-04-151-10/+16
|\
| * onecmd_plus_hooks() no longer handles updating any state data related to ↵Kevin Van Brunt2020-04-121-10/+16
| | | | | | | | | | | | redirection. For simplicity, it's all done in _redirect_output() and _restore_output().
| * Simplfied _redirect_output() by raising exception instead of returning boolKevin Van Brunt2020-04-111-1/+1
| |
* | Merge branch 'master' into table_creatorKevin Van Brunt2020-04-111-1/+1
|\ \ | |/
| * Made some optional arguments with defaults keyword-only.Kevin Van Brunt2020-04-111-1/+1
| | | | | | | | | | Added unit test for echo argument to pyscript app() command. Removed _relative_load from hidden commands since that command was renamed.
* | Initial commit of table creation APIKevin Van Brunt2020-04-091-17/+56
|/
* Making build_settables() public againKevin Van Brunt2020-02-281-1/+1
|
* Merge branch 'master' into api_docskotfu2020-02-211-2/+2
|\
| * Removed hyphen from tab-completionKevin Van Brunt2020-02-211-2/+2
| |
* | Embedded examples and cross-links for categorize() and with_category()kotfu2020-02-201-1/+13
| |
* | Fix merge errorkotfu2020-02-201-15/+0
| |
* | Merge branch 'master' into api_docskotfu2020-02-201-2/+42
|\ \ | |/ | | | | | | | | | | | | # Conflicts: # CHANGELOG.md # cmd2/__init__.py # cmd2/decorators.py # docs/api/utility_functions.rst
| * Moved categorize() to utils.py and made set_parser_prog() non-publicKevin Van Brunt2020-02-201-0/+15
| |
| * Added apply_style to CompletionErrorKevin Van Brunt2020-02-181-1/+15
| | | | | | | | Simplified error class structure in argparse_completer.py
| * Made CompletionError exception available to non-argparse tab completionKevin Van Brunt2020-02-171-0/+11
| |
| * Renamed AutoCompleter to ArgparseCompleter for clarityKevin Van Brunt2020-02-171-2/+2
| |
* | move `categorize()` to `utils.py` and make `set_parser_prog` a private methodkotfu2020-02-141-0/+15
|/
* Fix optional type hintTodd Leonhardt2020-02-111-2/+2
| | | | typing.OrderedDict wasn't added until Python 3.7.2; so replace with Dict.
* Allowing for colored fill char in align_textKevin Van Brunt2020-02-111-14/+34
| | | | Added function to index all style sequences found in a string
* Fixed bug where ANSI style sequences were not correctly handled in ↵Kevin Van Brunt2020-02-111-17/+61
| | | | utils.truncate_line()
* Added more to Settable docstringKevin Van Brunt2020-02-051-2/+9
|
* Added more to onchange_cb documentationKevin Van Brunt2020-02-051-3/+7
|