Cmd2

Latest version: v2.5.11

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 17

1.3.3

- Breaking changes
- CommandSet command functions (do*, complete*, help\_) will no longer have the cmd2 app
passed in as the first parameter after `self` since this is already a class member.
- Renamed `install_command_set()` and `uninstall_command_set()` to `register_command_set()` and
`unregister_command_set()` for better name consistency.
- Bug Fixes
- Fixed help formatting bug in `Cmd2ArgumentParser` when `metavar` is a tuple
- Fixed tab completion bug when using `CompletionItem` on an argument whose `metavar` is 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
- Other
- Added missing doc-string for new cmd2.Cmd **init** parameters
introduced by CommandSet enhancement

1.3.2

- Bug Fixes
- Fixed `prog` value of subcommands added with `as_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
- Enhancements
- Added functions to fetch registered CommandSets by type and command name

1.3.1

- Bug Fixes
- Fixed issue determining whether an argparse completer function required a reference to a containing
CommandSet. Also resolves issues determining the correct CommandSet instance when calling the argparse
argument completer function. Manifested as a TypeError when using `cmd2.Cmd.path_complete` as a completer
for an argparse-based command defined in a CommandSet

1.3.0

- Enhancements
- Added CommandSet - Enables defining a separate loadable module of commands to register/unregister
with your cmd2 application.
- Other
- Marked with_argparser_and_unknown_args pending deprecation and consolidated implementation into
with_argparser

1.2.1

- Bug Fixes
- Relax minimum version of `importlib-metadata` to >= 1.6.0 when using Python < 3.8

1.2.0

- Bug Fixes
- Fixed `typing` module compatibility issue with Python 3.5 prior to 3.5.4
- Enhancements
- Switched to getting version using `importlib.metadata` instead of using `pkg_resources`
- Improves `cmd2` application launch time on systems that have a lot of Python packages on `sys.path`
- Added dependency on `importlib_metadata` when running on versions of Python prior to 3.8

Page 7 of 17

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.