Releases
0.10.0
0.10.0 (February 7, 2020)
Enhancements
Changed the default help text to make help -v
more discoverable
set command now supports tab-completion of values
Added add_settable()
and remove_settable()
convenience methods to update self.settable
dictionary
Added convenience ansi.fg
and ansi.bg
enums of foreground and background colors
ansi.style()
fg
argument can now either be of type str
or ansi.fg
ansi.style()
bg
argument can now either be of type str
or ansi.bg
This supports IDE auto-completion of color names
The enums also support
f-strings
and format()
calls (e.g. "{}hello{}".format(fg.blue, fg.reset)
)
string concatenation (e.g. fg.blue + "hello" + fg.reset
)
Breaking changes
Renamed locals_in_py
attribute of cmd2.Cmd
to self_in_py
The following public attributes of cmd2.Cmd
are no longer settable at runtime by default:
continuation_prompt
self_in_py
prompt
self.settable
changed to self.settables
It is now a Dict[str, Settable] instead of Dict[str, str]
setting onchange callbacks have a new method signature and must be added to the
Settable instance in order to be called
Removed cast()
utility function
Removed ansi.FG_COLORS
and ansi.BG_COLORS
dictionaries
Replaced with ansi.fg
and ansi.bg
enums providing similar but improved functionality
Notes
This is an alpha release leading up to the 1.0.0 release
We intend no more breaking changes prior to 1.0.0
Just bug fixes, documentation updates, and enhancements
You can’t perform that action at this time.