3.0.0rc1 Release Candidate (2025-09-26) #1526
tleonhardt
started this conversation in
General
Replies: 0 comments
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
cmd2now has a dependency on rich for rich text and prettyformatting in the terminal. Previously,
cmd2had a large amount of custom code for this purposethat predated the existence of
rich. This opens the door to even more beautifulcmd2applications. 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.pymodule in favor ofrichtables (see therich_tables.py
example for more info)
utils.pyto a newstring_utils.pymoduleansi.pyintostring_utils.pyansi.pywith modernrichstylesansi.pytoterminal_utils.pyto better reflect its purposecmd2now requires Python 3.10 or laterSettable.get_value()andSettable.set_value()methods with a more Pythonicvaluepropertyprogvalue in thewith_argparser()decorator, asthis is now handled centrally in
Cmd._build_parser()auto_load_commandsargument tocmd2.Cmd.__init__now defaults toFalseEnhancements
poutput(),perror(),ppaged(), etc.) to natively renderrichobjects, 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.pyandstyles.pyto provide easy access torichcolor names and managecmd2-specific style definitions usingStrEnum(see thecolors.py example for a
demonstration of all colors available to your
cmd2application)cmd2application usingrich_utils.set_theme(see the rich_theme.py
example for more info)
stty sanewith
termios.tcsetattrBug Fixes
cmd2could unintentionally overwrite an application'ssys.stdoutMigration Aids - these will help you iteratively migrate to
cmd23.x in stagesthe
cmd2.ansimodule present incmd22.7.0the
cmd2.table_creatormodule present incmd22.7.0This discussion was created from the release 3.0.0rc1 Release Candidate (2025-09-26).
Beta Was this translation helpful? Give feedback.
All reactions