Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed issue where instantiating more than one cmd2-based class which uses ↵duplicate_subcommand | Kevin Van Brunt | 2020-09-30 | 1 | -0/+8 |
| | | | | | | the @as_subcommand_to decorator resulted in duplicated help text in the base command the subcommands belong to. | ||||
* | Fixed issue where quoted redirectors and terminators in aliases and macros ↵ | Kevin Van Brunt | 2020-09-30 | 1 | -16/+54 |
| | | | | | | were not being restored when read from a startup script. | ||||
* | Only setting subcommand handler on attached_parser and not its parent parser | Kevin Van Brunt | 2020-09-28 | 1 | -4/+6 |
| | |||||
* | Small refactorsilence | Kevin Van Brunt | 2020-09-17 | 1 | -6/+6 |
| | |||||
* | Merge branch 'master' into silence | Kevin Van Brunt | 2020-09-17 | 1 | -1/+6 |
|\ | |||||
| * | Changes default category to be heritable by default - meaning that ↵ | Eric Lin | 2020-09-11 | 1 | -1/+6 |
| | | | | | | | | | | | | subclasses will inherit the parent class's default category. Adds optional flag to disable heritability. | ||||
* | | Added --silent flag to alias/macro create. | Kevin Van Brunt | 2020-09-10 | 1 | -12/+36 |
|/ | | | | Added --with_silent flag to alias/macro list. | ||||
* | Added type hint | Kevin Van Brunt | 2020-09-05 | 1 | -2/+1 |
| | |||||
* | Added always_show_hint setting | Kevin Van Brunt | 2020-09-05 | 1 | -14/+35 |
| | | | | Fixed issue where flag names weren't always sorted correctly in argparse tab completion | ||||
* | Added CommandSet.on_unregistered() | Kevin Van Brunt | 2020-09-03 | 1 | -2/+4 |
| | |||||
* | Added on_registered() callback to CommandSet | Kevin Van Brunt | 2020-09-01 | 1 | -0/+1 |
| | |||||
* | Fixed issue where subcommand added with @as_subcommand_to decorator did not ↵ | Kevin Van Brunt | 2020-08-27 | 1 | -9/+9 |
| | | | | | | display help when called with -h/--help. 'add_help=False' no longer has to be passed to parsers used in @as_subcommand_to decorator. | ||||
* | The functions cmd2 adds to Namespaces (get_statement() and get_handler()) ↵ | Kevin Van Brunt | 2020-08-26 | 1 | -2/+2 |
| | | | | | | | are now Cmd2AttributeWrapper objects named cmd2_statement and cmd2_handler. This makes it easy to filter out which attributes in an argparse.Namespace were added by cmd2. | ||||
* | Fixed RecursionError when printing an argparse.Namespace caused by custom ↵ | Kevin Van Brunt | 2020-08-25 | 1 | -1/+3 |
| | | | | | | attribute cmd2 was adding Added get_statement() function to argparse.Namespace which returns __statement__ attribute | ||||
* | Fixed typo | Kevin Van Brunt | 2020-08-21 | 1 | -1/+1 |
| | |||||
* | Added validation of subcommand handler attributes | Eric Lin | 2020-08-20 | 1 | -1/+5 |
| | |||||
* | Fixed AttributeError when CommandSet that uses as_subcommand_to decorator is ↵ | Kevin Van Brunt | 2020-08-19 | 1 | -16/+22 |
| | | | | loaded during cmd2.Cmd.__init__(). | ||||
* | When passing a ns_provider to an argparse command, will now attempt to ↵ | Eric Lin | 2020-08-12 | 1 | -1/+49 |
| | | | | 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 | -19/+12 |
| | | | | | | CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set. | ||||
* | Updated with missing doc-string for new CommandSet parameters for cmd2.Cmd's ↵ | Eric Lin | 2020-08-10 | 1 | -0/+8 |
| | | | | constructor | ||||
* | Will now traverse down CommandSet inheritance tree to find all leaf descendants.1.3.2 | Eric Lin | 2020-08-10 | 1 | -8/+38 |
| | | | | | | CommandSet now has a check to ensure it is only registered with one cmd2.Cmd instance at a time. Adds function to find command set by type and by command name | ||||
* | Moved a comment to better section off code | Kevin Van Brunt | 2020-08-07 | 1 | -8/+8 |
| | |||||
* | Removed unnecessary prog value from subcommand parsers | Kevin Van Brunt | 2020-08-07 | 1 | -6/+6 |
| | |||||
* | Moved code which copies subparser's settings to _register_subcommands(). | Kevin Van Brunt | 2020-08-07 | 1 | -155/+175 |
| | | | | | Changed alias and macro commands to use as_subcommand_to() decorator. Updated CommandSet subcommand example to use help and description text. | ||||
* | Minor formatting fixes. Injecting a function into namespace objects before ↵ | Eric Lin | 2020-08-04 | 1 | -7/+8 |
| | | | | passing to command handlers to access sub-command handlers | ||||
* | Now maintains a command->CommandSet mapping and passes the CommandSet | anselor | 2020-08-04 | 1 | -36/+104 |
| | | | | | | | | | | | | | | | 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. | ||||
* | 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 |
| | |||||
* | Removed sub-class and instead patch argparse._SubParsersAction | Eric Lin | 2020-08-04 | 1 | -3/+3 |
| | |||||
* | Suggested PR Fixes. | Eric Lin | 2020-08-04 | 1 | -19/+15 |
| | | | | | 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 | 1 | -5/+94 |
| | | | | | | load/unload. Updated examples and documentation to include discussion of injectable sub-commands. | ||||
* | updated imports | Eric Lin | 2020-08-04 | 1 | -3/+2 |
| | | | | Added additional documentation | ||||
* | Removed support for functions outside of CommandSets | Eric Lin | 2020-08-04 | 1 | -74/+11 |
| | |||||
* | 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 | ||||
* | Added more command validation. Moved some common behavior into private ↵ | Eric Lin | 2020-08-04 | 1 | -26/+49 |
| | | | | functions. | ||||
* | Fixes to sphinx generation | Eric Lin | 2020-08-04 | 1 | -1/+1 |
| | |||||
* | Fixes issue with locating help_ annd complete_ functions when autoloading ↵ | Eric Lin | 2020-08-04 | 1 | -5/+27 |
| | | | | | | command functions Adds handling of some edge cases. More thorough test coverage. | ||||
* | add ability to remove commands and commandsets | Eric Lin | 2020-08-04 | 1 | -4/+46 |
| | | | | 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 | 1 | -4/+4 |
| | | | | | | for CommandSet commands. Issue #943 | ||||
* | Initial implementation of modular command loading | Eric Lin | 2020-08-04 | 1 | -2/+64 |
| | | | | | | | | | | 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 type annotations for fields in cmd2.Cmd. | Eric Lin | 2020-07-21 | 1 | -26/+27 |
| | | | | | | | 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 |
| | |||||
* | Merge branch 'master' into hint_bug | Kevin Van Brunt | 2020-06-01 | 1 | -24/+30 |
|\ | |||||
| * | 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 | 1 | -17/+25 |
| | | | | | | | | | | 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 | 1 | -7/+7 |
| | | | | | | | | Both exception classes have been added to the public API. | ||||
* | | Updated argparse_completer to use TableCreator for the hint table | Kevin Van Brunt | 2020-05-28 | 1 | -2/+2 |
|/ |