| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Deleted bash tab completion support.
AutoCompleter no longer assumes CompletionItem results are sorted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
logic in the argcomplete function but doesn't test actual completion in bash.
|
|
|
|
| |
stderr to bypass bash completion handling.
|
| |
|
|
|
|
| |
Updated argcomplete_bridge to use new constants/utils.
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|