Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Argparse tab completer will complete remaining flag names if there are no ↵ | Kevin Van Brunt | 2021-09-07 | 1 | -3/+4 |
| | | | | more positionals to complete. | ||||
* | Added cmd2.Cmd method to determine what ArgparseCompleter type to use | Kevin Van Brunt | 2021-09-01 | 1 | -15/+3 |
| | |||||
* | Added ap_completer_type arg to Cmd2ArgumentParser.__init__(). | Kevin Van Brunt | 2021-09-01 | 1 | -1/+1 |
| | | | | Added unit tests for custom ArgparseCompleter | ||||
* | Refactored custom ArgparseCompleter functionality so they will now be set ↵ | Kevin Van Brunt | 2021-09-01 | 1 | -10/+31 |
| | | | | | | using methods on ArgumentParser objects. This fixes issue where subcommands did not use the correct custom ArgparseCompleter type. | ||||
* | Merge branch 'master' into topic_width | Kevin Van Brunt | 2021-08-23 | 1 | -11/+34 |
|\ | |||||
| * | * New function `set_default_command_completer_type()` allows developer to ↵ | Eric Lin | 2021-08-23 | 1 | -11/+34 |
| | | | | | | | | | | | | | | | | | | extend and modify the behavior of `ArgparseCompleter`. * New function `register_argparse_argument_parameter()` allows developers to specify custom parameters to be passed to the argparse parser's `add_argument()` method. These parameters will become accessible in the resulting argparse Action object when modifying `ArgparseCompleter` behavior. | ||||
* | | set command output now uses SimpleTable. | Kevin Van Brunt | 2021-08-19 | 1 | -1/+1 |
|/ | | | | | | | Tabled tab completion now includes divider row. Tab completion results for aliases, macros, and Settables wrap long fields. SimpleTable now accepts blank for the divider character. It is identical to passing None. Removed --verbose flag from set command so the descriptions always show. | ||||
* | Added accessor methods for cmd2-specific attributes to the argparse.Action ↵ | Kevin Van Brunt | 2021-07-04 | 1 | -10/+4 |
| | | | | | | class. Deprecated set_choices_provider() and set_completer() functions in favor of these new methods. | ||||
* | And that's the last of it. Passes mypy. | Eric Lin | 2021-04-06 | 1 | -15/+29 |
| | |||||
* | More mypy fixes | Eric Lin | 2021-04-06 | 1 | -29/+46 |
| | |||||
* | Fixed issue where argparse choices could not be CompletionItems | Kevin Van Brunt | 2021-03-02 | 1 | -2/+5 |
| | |||||
* | Made changes requested in code review | Kevin Van Brunt | 2021-03-02 | 1 | -1/+1 |
| | |||||
* | Added support for ANSI styles and newlines in tab completion results | Kevin Van Brunt | 2021-03-02 | 1 | -13/+10 |
| | |||||
* | Deprecate Python 3.5 | Todd Leonhardt | 2021-02-20 | 1 | -1/+1 |
| | |||||
* | Fixed black, isort, flake8, and doc8 issues | Todd Leonhardt | 2021-02-19 | 1 | -15/+28 |
| | |||||
* | Merge branch 'master' into black | Todd Leonhardt | 2021-02-19 | 1 | -51/+45 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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.0 | Kevin Van Brunt | 2021-01-22 | 1 | -6/+24 |
| |\ | |||||
| * \ | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-11-12 | 1 | -2/+6 |
| |\ \ | |||||
| * \ \ | Merge branch '2.0' into read_input | Kevin Van Brunt | 2020-09-09 | 1 | -1/+19 |
| |\ \ \ | |||||
| | * \ \ | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-09-09 | 1 | -1/+19 |
| | |\ \ \ | |||||
| * | \ \ \ | Merge branch '2.0' into read_input | Kevin Van Brunt | 2020-09-05 | 1 | -30/+38 |
| |\ \ \ \ \ | | |/ / / / | |||||
| | * | | | | Merge branch 'master' into 2.0 | Kevin Van Brunt | 2020-09-05 | 1 | -30/+38 |
| | |\ \ \ \ | |||||
| * | | | | | | Updated comments | Kevin Van Brunt | 2020-09-01 | 1 | -1/+1 |
| | | | | | | | |||||
| * | | | | | | Refactored ArgparseCompleter to support custom completion | Kevin Van Brunt | 2020-09-01 | 1 | -23/+29 |
| |/ / / / / | |||||
| * | | | | | Replaced choices_function / choices_method with choices_provider. | Kevin Van Brunt | 2020-08-13 | 1 | -13/+12 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 changes | Todd Leonhardt | 2021-01-31 | 1 | -2/+6 |
| | | | | | | |||||
* | | | | | | Add black for automatic code format | Todd Leonhardt | 2021-01-31 | 1 | -44/+54 |
| |_|_|_|/ |/| | | | | |||||
* | | | | | Changed isort to force wrapping of imports to reduce merge conflicts from ↵ | Eric Lin | 2021-01-22 | 1 | -6/+25 |
| |_|_|/ |/| | | | | | | | | | | | minor import changes. | ||||
* | | | | Fixed bug where setting always_show_hint=True did not show a hint when ↵settable_hint | Kevin Van Brunt | 2020-11-12 | 1 | -2/+6 |
| |_|/ |/| | | | | | | | | completing Settables | ||||
* | | | argparse tab completion now groups flag names which run the same action. ↵ | Kevin Van Brunt | 2020-09-09 | 1 | -1/+19 |
| |/ |/| | | | | | | | | | Optional flags are wrapped in brackets like it is done in argparse usage text. | ||||
* | | Added always_show_hint setting | Kevin Van Brunt | 2020-09-05 | 1 | -30/+38 |
|/ | | | | Fixed issue where flag names weren't always sorted correctly in argparse tab completion | ||||
* | Fixed tab completion bug when using CompletionItem on an argument whose ↵ | Kevin Van Brunt | 2020-08-13 | 1 | -15/+24 |
| | | | | metavar is a tuple | ||||
* | When passing a ns_provider to an argparse command, will now attempt to ↵ | Eric Lin | 2020-08-12 | 1 | -39/+9 |
| | | | | resolve the correct CommandSet instance for self. If not, it'll fall back and pass in the cmd2 app | ||||
* | Breaking change: Removed cmd2 app as a required second parameter to | Eric Lin | 2020-08-12 | 1 | -1/+2 |
| | | | | | | CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set. | ||||
* | Verify that a completer function is defined in a CommandSet before | Eric Lin | 2020-08-06 | 1 | -7/+38 |
| | | | | | | | | | | passing it a CommandSet instance. Search for a CommandSet instance that matches the completer's parent class type.` Resolves Issue #967 Renamed isolated_tests directory to tests_isolated for better visual grouping. Added some exception documentation | ||||
* | Now maintains a command->CommandSet mapping and passes the CommandSet | anselor | 2020-08-04 | 1 | -5/+17 |
| | | | | | | | | | | | | | | | through to the ArgparseCompleter if one is registered. For subcommands, the registered argparse instance for the subcommand is now tagged with the CommandSet from which it originated. If a CommandSet is detected, it's now passed in as 'self' for the completion functions. Fixes some issue found with removing a subcommand. Adds additional tests. Added a check to prevent removal of a CommandSet if it has commands with sub-commands from another CommandSet bound to it. Documentation improvements. Standardized around using CommandSetRegistrationException during commandset install/uninstall related errors. Added support for nested sub-command injection. | ||||
* | Removed divider row from tab completion hint table | Kevin Van Brunt | 2020-06-01 | 1 | -1/+1 |
| | |||||
* | Optimized imports | Kevin Van Brunt | 2020-06-01 | 1 | -2/+1 |
| | |||||
* | Changed how SimpleTable creates divider when divider_char is wide. It no ↵ | Kevin Van Brunt | 2020-06-01 | 1 | -3/+2 |
| | | | | longer stretches the width of the table. | ||||
* | Updated argparse_completer to use TableCreator for the hint table | Kevin Van Brunt | 2020-05-28 | 1 | -18/+27 |
| | |||||
* | Added info on semantic versioning and branching strategy to CONTRIBUTING.md | Todd Leonhardt | 2020-04-24 | 1 | -4/+10 |
| | | | | | | | 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 | ||||
* | Initial commit of table creation API | Kevin Van Brunt | 2020-04-09 | 1 | -5/+4 |
| | |||||
* | Removed extra new line in error message | Kevin Van Brunt | 2020-02-18 | 1 | -1/+1 |
| | |||||
* | Added apply_style to CompletionError | Kevin Van Brunt | 2020-02-18 | 1 | -44/+12 |
| | | | | Simplified error class structure in argparse_completer.py | ||||
* | Fixed issue where argparse completion errors were being rewrapped as ↵ | Kevin Van Brunt | 2020-02-18 | 1 | -7/+16 |
| | | | | _ActionCompletionError in some cases | ||||
* | Made CompletionError exception available to non-argparse tab completion | Kevin Van Brunt | 2020-02-17 | 1 | -123/+113 |
| | |||||
* | Renamed AutoCompleter to ArgparseCompleter for clarity | Kevin Van Brunt | 2020-02-17 | 1 | -15/+15 |
| | |||||
* | Using metavar in CompletionItem header if it has been set | Kevin Van Brunt | 2020-02-13 | 1 | -2/+4 |
| | |||||
* | Removed unnecessary inheritance from object | Kevin Van Brunt | 2020-02-04 | 1 | -2/+2 |
| | |||||
* | Renamed ansi_safe_wcswidth() to style_aware_wcswidth() | Kevin Van Brunt | 2019-12-19 | 1 | -3/+3 |
| | | | | Renamed ansi_aware_write() to style_aware_write() |