summaryrefslogtreecommitdiff
path: root/tests/test_completion.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Fix flake8 issuesTodd Leonhardt2018-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined
* Added more code coverage of shell_cmd_completeKevin Van Brunt2018-10-261-0/+15
|
* Added more coverage for path_completeKevin Van Brunt2018-10-261-3/+24
|
* Refactored filtering in path_complete to use a functionKevin Van Brunt2018-10-261-1/+1
|
* Added code to handle -- in argparse completerKevin Van Brunt2018-10-101-25/+0
|
* Increasing code coverageKevin Van Brunt2018-10-091-0/+24
|
* Using sub-command instead of subcommand where possible to be consistent with ↵Kevin Van Brunt2018-10-051-18/+18
| | | | argparse
* Added more code coverage with unit testsKevin Van Brunt2018-09-281-0/+17
|
* Added more code coverageKevin Van Brunt2018-09-281-0/+9
|
* Merge branch 'macro' into argparse_conversionKevin Van Brunt2018-09-281-4/+4
|\
| * Addressing code review commentsKevin Van Brunt2018-09-281-4/+4
| |
* | Merge branch 'macro' into argparse_conversionKevin Van Brunt2018-09-271-1/+18
|\ \ | |/
| * Made _func_named() more reliableKevin Van Brunt2018-09-271-1/+18
| | | | | | | | Added unit tests
* | Ported shell to argparseKevin Van Brunt2018-09-271-5/+14
| |
* | Fixed unit tests for help completionKevin Van Brunt2018-09-261-13/+32
| |
* | Converted help to argparseKevin Van Brunt2018-09-261-1/+1
|/
* Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-11/+3
| | | | | | | | | Now there is a single class, StdSim in utils.py, which is intended to simulate stdout and stderr file objects. This class replaced the following: - pyscript_bridge.py::CopyStream - transcript.py::OutputTrap - conftest.py::StdOut