| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Marked with_arparser_and_unknown_args deprecated and consolidated | Eric Lin | 2020-08-04 | 1 | -64/+33 |
| | | | | | implementation as an option to with_argparser instead. | ||||
| * | Minor formatting fixes. Injecting a function into namespace objects before ↵ | Eric Lin | 2020-08-04 | 5 | -8/+25 |
| | | | | | passing to command handlers to access sub-command handlers | ||||
| * | Now maintains a command->CommandSet mapping and passes the CommandSet | anselor | 2020-08-04 | 6 | -55/+168 |
| | | | | | | | | | | | | | | | | 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. | ||||
| * | Updated documentation | Kevin Van Brunt | 2020-08-04 | 1 | -2/+10 |
| | | |||||
| * | Updated documentation | Kevin Van Brunt | 2020-08-04 | 1 | -1/+5 |
| | | |||||
| * | Added handling for disabled commands to CommandSet functions | Kevin Van Brunt | 2020-08-04 | 1 | -6/+19 |
| | | |||||
| * | Fixes to how command callables are filtered from CommandSet | Eric Lin | 2020-08-04 | 1 | -4/+5 |
| | | |||||
| * | Fixed issue where we attempted to remove CommandSet from a list it was not in | Kevin Van Brunt | 2020-08-04 | 1 | -1/+2 |
| | | |||||
| * | Fixed typo in documentation | Kevin Van Brunt | 2020-08-04 | 1 | -3/+3 |
| | | |||||
| * | Removed sub-class and instead patch argparse._SubParsersAction | Eric Lin | 2020-08-04 | 2 | -27/+29 |
| | | |||||
| * | Suggested PR Fixes. | Eric Lin | 2020-08-04 | 4 | -27/+35 |
| | | | | | | sub-commande => subcommand Added help/aliases to `as_subcommand_to` decorator. | ||||
| * | Adds unit tests for sub-commands and additional commandset edge cases | Eric Lin | 2020-08-04 | 1 | -12/+17 |
| | | |||||
| * | Adds support for injectable subcommands as part of CommandSet | Eric Lin | 2020-08-04 | 5 | -8/+160 |
| | | | | | | | load/unload. Updated examples and documentation to include discussion of injectable sub-commands. | ||||
| * | updated imports | Eric Lin | 2020-08-04 | 3 | -5/+7 |
| | | | | | Added additional documentation | ||||
| * | Updates the example to remove usage of the now remove ability to | Eric Lin | 2020-08-04 | 1 | -5/+26 |
| | | | | | | | | | | | register arbitrary functions as commands. Added example that demonstrates use of each of the command decorators with CommandSets. Adds unit test that verifies that CommandSets containing decorators load and process commands correctly. Updated the constructor declaration for Cmd2ArgumentParser to explicitly re-declare argparse constructor parameters. | ||||
| * | Removed support for functions outside of CommandSets | Eric Lin | 2020-08-04 | 3 | -100/+12 |
| | | |||||
| * | added additional documentation for new decorator behavior | Eric Lin | 2020-08-04 | 1 | -3/+24 |
| | | |||||
| * | Added an additional check for isinstance(method, Callable) since there are ↵ | Eric Lin | 2020-08-04 | 1 | -1/+2 |
| | | | | | scenarios where inspect.ismethod() fails for some reason | ||||
| * | Adjusted decorators to accept variable positional parameters | Eric Lin | 2020-08-04 | 1 | -18/+41 |
| | | |||||
| * | Sort imports using isort | Todd Leonhardt | 2020-08-04 | 1 | -7/+2 |
| | | |||||
| * | Appears to be a type hinting olution that works for flake, sphinx, and PyCharm | Eric Lin | 2020-08-04 | 1 | -8/+11 |
| | | |||||
| * | Added more command validation. Moved some common behavior into private ↵ | Eric Lin | 2020-08-04 | 2 | -27/+50 |
| | | | | | functions. | ||||
| * | Fixes to sphinx generation | Eric Lin | 2020-08-04 | 2 | -2/+2 |
| | | |||||
| * | Fixes issue with locating help_ annd complete_ functions when autoloading ↵ | Eric Lin | 2020-08-04 | 2 | -26/+35 |
| | | | | | | | command functions Adds handling of some edge cases. More thorough test coverage. | ||||
| * | add ability to remove commands and commandsets | Eric Lin | 2020-08-04 | 2 | -5/+54 |
| | | | | | Issue #943 | ||||
| * | Added new constructor parameter to flag whether commands should autoload. ↵ | Eric Lin | 2020-08-04 | 1 | -31/+83 |
| | | | | | | | Added unit tests. Moved installing commands into separate functions that can be called Issue #943 | ||||
| * | Some minor cleanup of how imports work. Fixed issue with help documentation ↵ | Eric Lin | 2020-08-04 | 3 | -7/+23 |
| | | | | | | | for CommandSet commands. Issue #943 | ||||
| * | Initial implementation of modular command loading | Eric Lin | 2020-08-04 | 2 | -2/+186 |
| | | | | | | | | | | | Issue #943 New class CommandSet can be used to tag a class as a command class. If the constructor is simple, the object will automatically be instantiated and loaded. New register_command decorator to tag any arbitrary function as a command. | ||||
| * | Added 'no cover' for code block which cannot be tested in our unit tests | Kevin Van Brunt | 2020-08-03 | 1 | -1/+1 |
| | | |||||
| * | Added type annotations for fields in cmd2.Cmd. | Eric Lin | 2020-07-21 | 2 | -27/+29 |
| | | | | | | | | Cleaned up docstring in external test plugin Updated some initialization to match new approach for version info discovery. Tagged some IDE-only lines as no-cover Adds plugin coverage reporting. | ||||
| * | Fixed hook documentation | Kevin Van Brunt | 2020-07-17 | 1 | -4/+4 |
| | | |||||
| * | Added PyCharm warning suppressions | Todd Leonhardt | 2020-07-13 | 1 | -0/+2 |
| | | |||||
| * | small simplification | Todd Leonhardt | 2020-07-13 | 1 | -2/+1 |
| | | |||||
| * | slight cleanup | Todd Leonhardt | 2020-07-13 | 1 | -2/+2 |
| | | |||||
| * | Address fact that typing.Deque wasn't defined prior to 3.5.4 | Todd Leonhardt | 2020-07-13 | 1 | -1/+9 |
| | | |||||
| * | replace pkg_resources with importlib.metadata | Doug Hellmann | 2020-07-12 | 1 | -3/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Importing pkg_resources has a side-effect of scanning every installed distribution on sys.path to load the metadata, especially the entry points defined in the packages. This can have a significant launch-time cost for command line applications when there are a lot of distributions to scan. Since cmd2 is only using pkg_resources to find the version of the installed package, pkg_resources can be replaced with importlib.metadata. The implementation in the new library is significantly faster because it goes immediately to the metadata file for the requested distribution, instead of scanning all of them. There are also no import-time side-effects. importlib.metadata is a new standard library module starting with python 3.8. For earlier versions, a compatible library has been released to PyPI as 'importlib_metadata'. This change adds the new dependency with a qualifier so that it is only applied to older versions of python, and then updates the places that were importing pkg_resources to look for the different versions of the new library instead. The documentation configuration is changed to import cmd2 itself to get its version, since the package has to be installed for the metadata to be available anyway. Signed-off-by: Doug Hellmann <doug@doughellmann.com> | ||||
| * | 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 |
| | | |||||
| * | Merge branch 'master' into hint_bug | Kevin Van Brunt | 2020-06-01 | 3 | -29/+53 |
| |\ | |||||
| | * | Removed pwarning() calls when command raises SystemExit | Kevin Van Brunt | 2020-05-28 | 1 | -2/+0 |
| | | | | | | | | | Added unit tests | ||||
| | * | Made following changes to onecmd_plus_hooks() | Kevin Van Brunt | 2020-05-07 | 2 | -21/+29 |
| | | | | | | | | | | | 1. Added SystemExit handling by warning the user it's occured and setting stop to True 2. KeyboardInterrupts won't be raised if stop is already set to True. | ||||
| | * | Added SkipPostcommandHooks exception and made Cmd2ArgparseError inherit from it. | Kevin Van Brunt | 2020-05-07 | 3 | -12/+30 |
| | | | | | | | | | Both exception classes have been added to the public API. | ||||
| * | | Simplied table divider code for ease of reading | Kevin Van Brunt | 2020-06-01 | 1 | -3/+5 |
| | | | |||||
| * | | Changed how SimpleTable creates divider when divider_char is wide. It no ↵ | Kevin Van Brunt | 2020-06-01 | 2 | -32/+45 |
| | | | | | | | | | longer stretches the width of the table. | ||||
| * | | Changed SimpleTable.base_width() to a class method and added equivalent ↵ | Kevin Van Brunt | 2020-05-28 | 1 | -10/+30 |
| | | | | | | | | | method to BorderedTable. | ||||
| * | | Updated argparse_completer to use TableCreator for the hint table | Kevin Van Brunt | 2020-05-28 | 3 | -31/+80 |
| |/ | |||||
| * | Added info on semantic versioning and branching strategy to CONTRIBUTING.md | Todd Leonhardt | 2020-04-24 | 8 | -20/+21 |
| | | | | | | | | 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 | ||||
| * | Completion doc updates | Kevin Van Brunt | 2020-04-23 | 1 | -12/+9 |
| | | |||||
| * | Documented CompletionError class | Kevin Van Brunt | 2020-04-23 | 1 | -4/+4 |
| | | |||||
| * | Updated _set_parser_prog() so future calls to add_parser() will set the ↵ | Kevin Van Brunt | 2020-04-23 | 1 | -1/+5 |
| | | | | | | | correct prog value This makes dynamically adding subcommands after the CLI starts easier. | ||||
