Cmd2

Latest version: v2.4.3

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

Scan your dependencies

Page 7 of 15

0.9.24

* Enhancements
* Flushing stderr when setting the window title and printing alerts for better responsiveness in cases where
stderr is not unbuffered.
* Added function to truncate a single line to fit within a given display width. `cmd2.utils.truncate_line`
supports characters with display widths greater than 1 and ANSI style sequences.
* Added line truncation support to `cmd2.utils` text alignment functions.
* Added support for Python 3.9 alpha

0.9.23

* Bug Fixes
* Fixed bug where startup script containing a single quote in its file name was incorrectly quoted
* Added missing implicit dependency on `setuptools` due to build with `setuptools_scm`
* Enhancements
* Added dim text style support via `style()` function and `ansi.INTENSITY_DIM` setting.
* Breaking changes
* Renamed the following `ansi` members for accuracy in what types of ANSI escape sequences are handled
* `ansi.allow_ansi` -> `ansi.allow_style`
* `ansi.ansi_safe_wcswidth()` -> `ansi.style_aware_wcswidth()`
* `ansi.ansi_aware_write()` -> `ansi.style_aware_write()`
* Renamed the following `ansi` members for clarification
* `ansi.BRIGHT` -> `ansi.INTENSITY_BRIGHT`
* `ansi.NORMAL` -> `ansi.INTENSITY_NORMAL`

0.9.22

* Bug Fixes
* Fixed bug where a redefined `ansi.style_error` was not being used in all `cmd2` files
* Enhancements
* Enabled line buffering when redirecting output to a file
* Added `align_left()`, `align_center()`, and `align_right()` to utils.py. All 3 of these functions support
ANSI escape sequences and characters with display widths greater than 1. They wrap `align_text()` which
is also in utils.py.

0.9.21

* Bug Fixes
* Fixed bug where pipe processes were not being stopped by Ctrl-C
* Added exception handling to account for non-standard Python environments in which readline is not loaded
dynamically from a shared library file
* Enhancements
* Added `read_input()` function that is used to read from stdin. Unlike the Python built-in `input()`, it also has
an argument to disable tab completion while input is being entered.
* Added capability to override the argument parser class used by cmd2 built-in commands. See override_parser.py
example for more details.
* Added `end` argument to `pfeedback()` to be consistent with the other print functions like `poutput()`.
* Added `apply_style` to `pwarning()`.
* Breaking changes
* For consistency between all the print functions:
* Made `end` and `chop` keyword-only arguments of `ppaged()`
* `end` is always added to message in `ppaged()`

0.9.20

* Bug Fixes
* Fixed bug where setting `use_ipython` to False removed ipy command from the entire `cmd2.Cmd` class instead of
just the instance being created
* Fix bug where cmd2 ran 'stty sane' command when stdin was not a terminal
* Enhancements
* Send all startup script paths to run_script. Previously we didn't do this if the file was empty, but that
showed no record of the run_script command in history.
* Made it easier for developers to override `edit` command by having `do_history` no longer call `do_edit`. This
also removes the need to exclude `edit` command from history list.
* It is no longer necessary to set the `prog` attribute of an argparser with subcommands. cmd2 now automatically
sets the prog value of it and all its subparsers so that all usage statements contain the top level command name
and not sys.argv[0].
* Breaking changes
* Some constants were moved from cmd2.py to constants.py
* cmd2 command decorators were moved to decorators.py. If you were importing them via cmd2's \_\_init\_\_.py, then
there will be no issues.

0.9.19

* Bug Fixes
* Fixed `ValueError` exception which could occur when an old format persistent history file is loaded with new `cmd2`
* Enhancements
* Improved displaying multiline CompletionErrors by indenting all lines

Page 7 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.