Releases: python-cmd2/cmd2
Releases · python-cmd2/cmd2
1.3.10 (September 17, 2020)
1.3.10 (September 17, 2020)
- Enhancements
- Added user-settable option called
always_show_hint. If True, then tab completion hints will always display even when tab completion suggestions print. Arguments whose help or hint text is suppressed will not display hints even when this setting is True. - argparse tab completion now groups flag names which run the same action. Optional flags are wrapped in brackets like it is done in argparse usage text.
- default category decorators are now heritable by default and will propagate the category down the class hierarchy until overridden. There's a new optional flag to set heritable to false.
- Added
--silentflag toalias/macro create. If used, then no confirmation message will be printed when aliases and macros are created or overwritten. - Added
--with_silentflag toalias/macro list. Use this option when saving to a startup script that should silently create aliases and macros.
- Added user-settable option called
- Bug Fixes
- Fixed issue where flag names weren't always sorted correctly in argparse tab completion
Plugin: External Test 0.2.0 (September 20, 2020)
- Updates version to 0.2.0
- Updates documentation to reflect the plugin's new home inside of the cmd2 main repository.
1.3.9 (September 03, 2020)
- Breaking Changes
CommandSet.on_unregister()is now called as first step in unregistering aCommandSetand not the last.CommandSet.on_unregistered()is now the last step.
- Enhancements
- Added
CommandSet.on_registered(). This is called bycmd2.Cmdafter aCommandSetis registered and all its commands have been added to the CLI. - Added
CommandSet.on_unregistered(). This is called bycmd2.Cmdafter aCommandSetis unregistered and all its commands have been removed from the CLI.
- Added
1.3.8 (August 28, 2020)
- Bug Fixes
- Fixed issue where subcommand added with
@as_subcommand_todecorator did not display help when called with-h/--help.
- Fixed issue where subcommand added with
- Enhancements
add_help=Falseno longer has to be passed to parsers used in@as_subcommand_todecorator.
Only pass this if your subcommand should not have the-h/--helphelp option (as stated in argparse documentation).
1.3.7 (August 27, 2020)
- Bug Fixes
- Fixes an issue introduced in 1.3.0 with processing command strings containing terminator/separator character(s) that are manually passed to a command that uses argparse.
1.3.6 (August 27, 2020)
- Breaking changes
- The functions cmd2 adds to Namespaces (
get_statement()andget_handler()) are nowCmd2AttributeWrapperobjects namedcmd2_statementandcmd2_handler. This makes it easy to filter out which attributes in anargparse.Namespacewere added bycmd2.
- The functions cmd2 adds to Namespaces (
- Deprecations
Namespace.__statement__will be removed incmd22.0.0. UseNamespace.cmd2_statement.get()going forward.
1.3.5 (August 25, 2020)
- Bug Fixes
- Fixed
RecursionErrorwhen printing anargparse.Namespacecaused by custom attribute cmd2 was adding
- Fixed
- Enhancements
- Added
get_statement()function toargparse.Namespacewhich returns__statement__attribute
- Added
1.3.4 (August 20, 2020)
- Bug Fixes
- Fixed
AttributeErrorwhenCommandSetthat usesas_subcommand_todecorator is loaded duringcmd2.Cmd.__init__().
- Fixed
- Enhancements
- Improved exception messages when using mock without
spec=True. See testing documentation for more details on testing cmd2-based applications with mock.
- Improved exception messages when using mock without
1.3.3 (August 13, 2020)
1.3.3 (August 13, 2020)
- Breaking changes
- CommandSet command functions (do_, complete_, help_) will no longer have the cmd2 app passed in as the first parameter after
selfsince this is already a class member. - Renamed
install_command_set()anduninstall_command_set()toregister_command_set()andunregister_command_set()for better name consistency.
- CommandSet command functions (do_, complete_, help_) will no longer have the cmd2 app passed in as the first parameter after
- Bug Fixes
- Fixed help formatting bug in
Cmd2ArgumentParserwhenmetavaris a tuple - Fixed tab completion bug when using
CompletionItemon an argument whosemetavaris a tuple - Added explicit testing against python 3.5.2 for Ubuntu 16.04, and 3.5.3 for Debian 9
- Added fallback definition of typing.Deque (taken from 3.5.4)
- Removed explicit type hints that fail due to a bug in 3.5.2 favoring comment-based hints instead
- When passing a ns_provider to an argparse command, will now attempt to resolve the correct CommandSet instance for self. If not, it'll fall back and pass in the cmd2 app
- Fixed help formatting bug in
- Other
- Added missing doc-string for new cmd2.Cmd init parameters introduced by CommandSet enhancement
1.3.2 (August 10, 2020)
- Bug Fixes
- Fixed
progvalue of subcommands added withas_subcommand_to()decorator. - Fixed missing settings in subcommand parsers created with
as_subcommand_to()decorator. These settings
include things like description and epilog text. - Fixed issue with CommandSet auto-discovery only searching direct sub-classes
- Fixed
- Enhancements
- Added functions to fetch registered CommandSets by type and command name