summaryrefslogtreecommitdiff
path: root/cmd2/argcomplete_bridge.py
Commit message (Collapse)AuthorAgeFilesLines
* Made cmd2_app a positional and required argument of AutoCompleter.Kevin Van Brunt2019-02-231-265/+0
| | | | | Deleted bash tab completion support. AutoCompleter no longer assumes CompletionItem results are sorted.
* Fix flake8 issuesTodd Leonhardt2018-12-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | 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
* Removed remaining type hints in docstringsKevin Van Brunt2018-09-211-4/+6
|
* Added back bash_complete() helper function to argcomplete_bridge.pyTodd Leonhardt2018-06-091-0/+13
| | | | | | This is intended to be used once a new example is added to show how to use the code present in argcomplete_bridge. This was previously used by the subcommands.py example, but I deleted the argcomplete_bridge code from there to simplify that example and make it focused on subcommands.
* Removed apparently dead code from argcomplete_bridge.pyTodd Leonhardt2018-06-091-30/+15
| | | | | | Also: - Made some minor formatting changes in argcomplete_bridge.py to make PyCharm happy - Fixed typo where "invoke clean" was cleaning up .pytest-cache instead of .pytest_cache
* Fixes problem with not passing the parameter hint suppression down to ↵Eric Lin2018-05-221-1/+13
| | | | | | | | sub-commands Added hint suppression on a per-parameter basis Added helper function to force an parameter to fall back to bash completion instead of using Cmd2 completion. - Hinting is still enabled by default but can be suppressed in the helper function.
* Bug fixes due to API differences in older versions of argcompleteTodd Leonhardt2018-05-191-6/+16
| | | | | | NOTES: - I didn't implement this correctly because I don't know how to programmatically determine the version of argcomplete; instead I based it on the version of Python - We should make sure this works correctly even if no version of argcomplete is installed
* Added argcomplete to unit test environment. Added exclusion for WindowsEric Lin2018-05-041-1/+1
|
* Adds some semblance of testing for bash completion. Tests the completion ↵Eric Lin2018-05-041-2/+2
| | | | logic in the argcomplete function but doesn't test actual completion in bash.
* Figured out how to detect the second tab press. Writing parameter hinting to ↵Eric Lin2018-05-031-6/+5
| | | | stderr to bypass bash completion handling.
* Addressed comments.Eric Lin2018-05-021-8/+6
|
* Merge remote-tracking branch 'origin/master' into bash_completionEric Lin2018-04-271-3/+4
| | | | Updated argcomplete_bridge to use new constants/utils.
* Added checks to detect if argcomplete is installed.Eric Lin2018-04-251-225/+234
|
* Removed the expensive imports from cmd2/__init__.pyEric Lin2018-04-251-5/+37
| | | | | | | Added some shared definitions to cmd2/__init__.py -> maybe there's a better place for these? Figured out how to trick bash into showing argument hints. It's a bit weird. Updated all of the tests and examples to import cmd2 resources from their new location without the automatic imports in cmd2/__init__.py For #369
* Initial customization of CompletionFinderEric Lin2018-04-241-0/+206