3.0.0b1 (2025-09-16) #1515
Closed
tleonhardt
started this conversation in
General
Replies: 1 comment
-
Closing duplicate discussion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
cmd2
now has a dependency on rich for rich text and prettyformatting in the terminal. Previously,
cmd2
had a large amount of custom code for this purposethat predated the existence of
rich
. This opens the door to even more beautifulcmd2
applications. To get the most out of the new capabilities, we encourage you to spend a little bit of
time reading the rich documentation.
Details
Breaking Changes
table_creator.py
module in favor ofrich
tables (see therich_tables.py
example for more info)
utils.py
to a newstring_utils.py
moduleansi.py
intostring_utils.py
ansi.py
with modernrich
stylesansi.py
toterminal_utils.py
to better reflect its purposecmd2
now requires Python 3.10 or laterSettable.get_value()
andSettable.set_value()
methods with a more Pythonicvalue
propertyprog
value in thewith_argparser()
decorator, asthis is now handled centrally in
Cmd._build_parser()
Enhancements
poutput()
,perror()
,ppaged()
, etc.) to natively renderrich
objects, enabling beautiful and complex outputcmd2
's built-in commands. See thecustom_parser.py
example for an updated guide
Cmd.macro_arg_complete()
for tab-completing macro arguments, with default pathcompletion that can be easily customized
colors.py
andstyles.py
to provide easy access torich
color names and managecmd2
-specific style definitions usingStrEnum
(see thecolors.py example for a
demonstration of all colors available to your
cmd2
application)cmd2
application usingrich_utils.set_theme
(see the rich_theme.py
example for more info)
stty sane
with
termios.tcsetattr
Bug Fixes
cmd2
could unintentionally overwrite an application'ssys.stdout
This discussion was created from the release 3.0.0b1 (2025-09-16).
Beta Was this translation helpful? Give feedback.
All reactions