summaryrefslogtreecommitdiff
path: root/cmd2/argparse_completer.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed bug where -- wasn't stopping a REMAINDER flag and did a lot of refactoringKevin Van Brunt2019-07-101-112/+105
|
* Small refactoring to simplify codeKevin Van Brunt2019-07-101-133/+131
|
* Fixed issue where names of remainder flags were not completingKevin Van Brunt2019-07-101-10/+10
|
* Resetting consumed arguments list each time a flag is usedKevin Van Brunt2019-07-081-32/+40
| | | | Started adding AutoCompleter unit tests for nargs.
* Added code to handle flags with action set to append, append_const, and ↵Kevin Van Brunt2019-07-081-1/+7
| | | | count in AutoCompleter
* Fixed issue where -- was not handled properly in AutoCompleter when the ↵Kevin Van Brunt2019-07-081-9/+9
| | | | parser's prefix characters did not include -
* Moved all custom argparse classes intended for normal development to ↵Kevin Van Brunt2019-07-071-52/+3
| | | | | | | argparse_custom.py. Lazy loading AutoCompleter in cmd2 instance methods to allow argparse_completer.py to import cmd2.Cmd class. This Architecture makes more sense because AutoCompleter depends on cmd2.Cmd.
* Hiding flags that have help value of SUPRESSED in tab completion resultsKevin Van Brunt2019-07-071-22/+25
| | | | Added more unit tests for argparse completer
* Removed AutoCompleter that globally disables tab hintsKevin Van Brunt2019-07-061-11/+5
|
* Fixed issue where default descriptive header wasn't set correctlyKevin Van Brunt2019-07-061-4/+6
|
* More unit testsKevin Van Brunt2019-07-061-2/+2
|
* Added ability to limit how many CompletionItems display at a timeKevin Van Brunt2019-07-061-1/+3
|
* Refactoring and more unit testsKevin Van Brunt2019-07-051-15/+15
|
* Added documentationKevin Van Brunt2019-07-051-4/+18
|
* Fixed some warningsKevin Van Brunt2019-07-051-10/+12
|
* Removed AutoCompleter parameters that are obsoleteKevin Van Brunt2019-07-051-35/+19
|
* Using argparse constants instead of hardcoded stringsKevin Van Brunt2019-07-041-3/+3
|
* No longer restricting nargs range support to Cmd2ArgParserKevin Van Brunt2019-07-041-114/+14
|
* Fixed spellingKevin Van Brunt2019-07-031-1/+1
|
* Moved cmd2 custom argparse types to argparse_custom.pyKevin Van Brunt2019-07-031-692/+26
| | | | Rename ACArgumentParser to Cmd2ArgParser
* Fixed some bugs in _resolve_choices_for_argKevin Van Brunt2019-07-031-10/+22
|
* Updated commentsKevin Van Brunt2019-07-031-8/+8
|
* Patched argparse._ActionsContainer.add_argument() to support more settings ↵Kevin Van Brunt2019-07-021-57/+61
| | | | like enabling tab completion and providing choice generating functions
* Added functions to enable tab completion and choices provider functions to ↵Kevin Van Brunt2019-07-021-74/+121
| | | | argparse argument values
* Moved basic_complete to utilsKevin Van Brunt2019-07-021-5/+7
|
* Small refactor and documentation updatesKevin Van Brunt2019-07-011-15/+34
|
* Moved cmd2.Cmd._decolorized_write() to ansi.py and renamed it to ↵Kevin Van Brunt2019-06-271-1/+8
| | | | ansi_aware_write().
* Changed default styles to use a more flexible approach which could be used ↵Kevin Van Brunt2019-06-261-2/+2
| | | | to call any function to add style
* Added TextStyle class and default implementations for various message types ↵Kevin Van Brunt2019-06-261-4/+3
| | | | like Warning, Error, and Succes
* Moved code related to ANSI escape codes to new file called ansi.pyKevin Van Brunt2019-06-261-1/+1
|
* Reverted making constant values for colors. This will be done on a future ↵Kevin Van Brunt2019-06-131-2/+2
| | | | ticket.
* Made constants for color valuesKevin Van Brunt2019-06-121-2/+2
|
* Removed copyright headers from source files and updated LICENSE with current ↵Kevin Van Brunt2019-06-071-3/+0
| | | | year
* Restored newlines to ACArgumentParser help and error textKevin Van Brunt2019-05-091-4/+2
|
* Removed more suppression of exceptions in argparse completer to help with ↵Kevin Van Brunt2019-05-071-21/+6
| | | | debugging tab-completion functions
* Removed try/except in argparse completion code since we don't want to ↵Kevin Van Brunt2019-05-061-13/+10
| | | | suppress exceptions
* ACArgumentParser no longer prints complete help text when a parsing error occursKevin Van Brunt2019-05-061-8/+5
|
* Fixed a lot of warningsKevin Van Brunt2019-03-011-1/+1
|
* Updated the examples to illustrate sorting CompletionItemsKevin Van Brunt2019-02-271-4/+4
|
* Added matches_sort_key member to cmd2Kevin Van Brunt2019-02-271-9/+14
|
* Made cmd2_app a positional and required argument of AutoCompleter.Kevin Van Brunt2019-02-231-36/+18
| | | | | Deleted bash tab completion support. AutoCompleter no longer assumes CompletionItem results are sorted.
* Fix flake8 issuesTodd Leonhardt2018-12-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | 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
* Fixed issue where flag at beginning of REMAINDER section was tab completingKevin Van Brunt2018-10-101-10/+8
|
* Added code to handle -- in argparse completerKevin Van Brunt2018-10-101-19/+40
|
* Added tests for token_resembles_flagKevin Van Brunt2018-10-091-1/+2
|
* Added ability for argcompleter to determine difference between flag and ↵Kevin Van Brunt2018-10-091-9/+30
| | | | negative number
* Fixed unit test failures and addressed code review commentsTodd Leonhardt2018-10-061-16/+16
|
* Merge remote-tracking branch 'origin/master' into argparse_remainderEric Lin2018-10-061-0/+7
|\
| * Using sub-command instead of subcommand where possible to be consistent with ↵Kevin Van Brunt2018-10-051-0/+7
| | | | | | | | argparse
* | Fixed a few edge cases:Eric Lin2018-10-061-6/+17
| | | | | | | | | | | | | | | | | | - Once the argument list can match a positional and that positional is tagged with nargs=argparse.REMAINDER it will consume all tokens including flag tokens. AutoCompleter now correctly detects this case will no longer attempt to complete flag tokens - A single-character token that is a flag prefix doesn't count as a flag and is parsed as a value. AutoCompleter now correctly detects this case.