summaryrefslogtreecommitdiff
path: root/tests/test_completion.py
Commit message (Collapse)AuthorAgeFilesLines
* Added support for 8-bit/256-colors with the cmd2.EightBitFg and ↵Kevin Van Brunt2021-10-181-0/+28
| | | | | | | | | | | | | | cmd2.EightBitBg classes. Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes. Removed dependency on colorama. Deprecated cmd2.fg. Use cmd2.Fg instead. Deprecated cmd2.bg. Use cmd2.Bg instead. Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class. Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered.
* Fixing tests on Python 3.10Kevin Van Brunt2021-06-171-2/+1
|
* Resolves comments from PREric Lin2021-03-181-1/+7
|
* Deprecate Python 3.5Todd Leonhardt2021-02-201-6/+3
|
* Fixed black, isort, flake8, and doc8 issuesTodd Leonhardt2021-02-191-2/+4
|
* Merge branch 'master' into blackTodd Leonhardt2021-02-191-13/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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-2/+0
| |\ | | | | | | | | | | | | # Conflicts: # CHANGELOG.md
| * | Removed with_argparser_and_unknown_args since it was deprecated in 1.3.0.Kevin Van Brunt2021-01-221-1/+1
| | |
| * | Merge branch 'master' into 2.0Kevin Van Brunt2021-01-221-3/+12
| |\ \
| * \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-11-121-0/+1
| |\ \ \
| * | | | Moved two classes from cmd2.py to utils.py.Kevin Van Brunt2020-09-091-1/+0
| | | | |
| * | | | Refactored complete() to handle custom behavior from read_input()Kevin Van Brunt2020-08-311-2/+2
| | | | |
| * | | | Replaced choices_function / choices_method with choices_provider.Kevin Van Brunt2020-08-131-7/+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-2/+6
| | | | |
* | | | | Add black for automatic code formatTodd Leonhardt2021-01-311-91/+147
| |_|_|/ |/| | |
* | | | Remove all use of AppVeyor for Windows testing because it is slower than ↵Todd Leonhardt2021-01-301-2/+0
| |_|/ |/| | | | | | | | GitHub Actions for the same purpose
* | | Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-4/+12
| |/ |/| | | | | minor import changes.
* | Fixed bug where setting always_show_hint=True did not show a hint when ↵settable_hintKevin Van Brunt2020-11-121-0/+1
|/ | | | completing Settables
* Marked with_arparser_and_unknown_args deprecated and consolidatedEric Lin2020-08-041-1/+1
| | | | implementation as an option to with_argparser instead.
* Added info on semantic versioning and branching strategy to CONTRIBUTING.mdTodd Leonhardt2020-04-241-0/+1
| | | | | | | Also: - Added isort to Pipenv dev - Added setup.cfg to make it easy to run flake8, doc8, and isort directly from the command line without using invoke - Ran isort to sort includes
* Only tab complete after redirection tokens if redirection is allowedKevin Van Brunt2020-02-171-28/+32
|
* Removed dash from 'tab complete' stringKevin Van Brunt2020-02-131-7/+7
|
* Added unit testsKevin Van Brunt2020-02-051-10/+41
|
* Made some cmd2 module constants cmd2.Cmd class constantsKevin Van Brunt2019-10-311-2/+2
|
* Removed all instances where a parser's prog attribute was being set since ↵Kevin Van Brunt2019-10-301-1/+1
| | | | this is no longer needed
* No longer printing all help text for alias and macro when the subcommand is ↵Kevin Van Brunt2019-09-171-1/+1
| | | | omitted. Instead allow argparse to handle the error.
* Added capability for an argparse-based command's completer/choice functions ↵Kevin Van Brunt2019-08-131-12/+4
| | | | | | | to receive a namespace of all arguments parsed up to token being completed. This will make it easier to have a previous argument's value affect what data is tab-completed.
* Updated unit testsKevin Van Brunt2019-08-021-7/+8
|
* Fixed inconsistent parsing/tab completion behavior based on the value of ↵Kevin Van Brunt2019-08-021-15/+0
| | | | | | `allow_redirection`. This flag is only meant to be a security setting that prevents redirection of stdout and should not alter parsing logic.
* Changed all uses of sub-command to subcommandKevin Van Brunt2019-07-191-18/+18
|
* Added unit tests for tab completing multiline commandsKevin Van Brunt2019-07-171-10/+46
|
* Renamed matches_sort_key to default_sort_key and using it to sort additional dKevin Van Brunt2019-07-151-3/+3
|
* Merge branch 'master' into auto_completer_refactorKevin Van Brunt2019-07-111-2/+2
|\
| * Restore self.statement_parser to a public attribute in cmd2.CmdTodd Leonhardt2019-07-101-2/+2
| |
* | Fixing unit testsKevin Van Brunt2019-07-041-5/+4
| |
* | Moved basic_complete to utilsKevin Van Brunt2019-07-021-5/+5
|/
* Added unit tests for _redirect_completeKevin Van Brunt2019-06-301-1/+74
|
* Made tokens_for_completion() method public since a couple of our examples use itTodd Leonhardt2019-06-231-5/+5
|
* Restored a few attributes to be publicTodd Leonhardt2019-06-231-38/+38
|
* Began work to minimize public APITodd Leonhardt2019-06-151-46/+46
|
* Updated various documentation and tests to not use loadTodd Leonhardt2019-06-151-1/+1
|
* Fixed unit testsKevin Van Brunt2019-06-151-1/+1
|
* Removed copyright headers from source files and updated LICENSE with current ↵Kevin Van Brunt2019-06-071-3/+0
| | | | year
* Increased code coverage of _complete_worker() to 100%Kevin Van Brunt2019-05-131-2/+43
|
* Exceptions occurring in tab completion functions are now printed to stderr ↵Kevin Van Brunt2019-05-061-0/+18
| | | | before returning control back to readline
* Added unit test for path completion in root directoryKevin Van Brunt2019-04-051-0/+19
|
* Made run_cmd return out and errKevin Van Brunt2019-03-201-1/+1
|
* Aliases are now stored within the StatementParser instanceTodd Leonhardt2019-03-161-1/+1
| | | | | | | Also: - Added read-only aliases property to cmd2.Cmd to get aliases from the StatementParser - Added a setter for the allow_redirection property in cmd2.Cmd - Made some initialization code more self-documenting
* First stage of attribute refactoringTodd Leonhardt2019-03-131-3/+3
| | | | | | | | | | The following are now arguments to cmd2.Cmd.__init__() instead of class attributes: * allow_redirection * multiline_commands * terminators * shortcuts Added a couple read-only properties for convenience of cmd2.Cmd accessing immutable members from self.statement_parser
* Added unit test for matches_sort_keyKevin Van Brunt2019-02-271-1/+27
|