73cd0e72e7
- update to 3.2.2: * Updated rich_utils.ANSI_STYLE_SEQUENCE_RE to only match ANSI SGR (Select Graphic Rendition) sequences for text styling. * The async_alert and async_prompt_update methods of cmd2.Cmd now respect the current value of the allow_style settable * If allow_style is NEVER, all style-related ANSI escape codes will be stripped to ensure plain text output
Dirk Mueller2026-02-23 10:12:53 +00:00
a0d92b1b05
Accepting request 1333674 from devel:languages:python
Ana Guerrero2026-02-18 16:04:30 +00:00
49de21c168
- Update to 3.2.0 * cmd2 now has a dependency on rich for rich text and pretty formatting in the terminal. Previously, cmd2 had a large amount of custom code for this purpose that predated the existence of rich. * Removed the legacy table_creator.py module in favor of rich tables * Moved most string-related functions from utils.py and ansi.py to string_utils.py * Added colors.py and styles.py to provide easy access to rich color names * cmd2 no longer has a dependency on cmd and cmd2.Cmd no longer inherits from cmd.Cmd * Fixed incompatibilities with Python 3.14.3. * To avoid future incompatibilities with argparse, we removed most of our overridden help functions. * Many more potentially breaking changes, see CHANGELOG.md
Markéta Machová2026-02-18 08:08:34 +00:00
416273b62b
Accepting request 1303569 from devel:languages:python
Ana Guerrero2025-09-11 12:38:09 +00:00
13d6018334
Accepting request 1303211 from home:mcalabkova:branches:devel:languages:python
Nico Krapp2025-09-10 09:11:38 +00:00
15ca2c9bb3
Accepting request 1290634 from devel:languages:python
Ana Guerrero2025-07-06 15:03:49 +00:00
63d02dac56
- update to 2.5.11: * Fixed duplicated parameter tables in API documentation. * Fixed docstring style for MkDocs API documentation so parameters are displayed properly. * Fixed 'index out of range' error when passing no arguments to an argparse-based command function. * Added ArgumentParser.get_ap_completer_type() and * Fixed bug where AutoCompleter was not distinguishing between a negative number and a flag * Fixed bug where AutoCompleter did not handle -- the same way argparse does (all args after -- are non-options) * The `preparse, postparsing_precmd, and postparsing_postcmd` methods *deprecated* in the previous release * Fixed bug in parsing of multiline commands where matching quote is on another line - update to 0.6.5.1:
Dirk Mueller2025-07-04 09:05:31 +00:00
cf0465200b
- update to 2.5.11: * Fixed duplicated parameter tables in API documentation. * Fixed docstring style for MkDocs API documentation so parameters are displayed properly. * Fixed 'index out of range' error when passing no arguments to an argparse-based command function. * Added ArgumentParser.get_ap_completer_type() and * Fixed bug where AutoCompleter was not distinguishing between a negative number and a flag * Fixed bug where AutoCompleter did not handle -- the same way argparse does (all args after -- are non-options) * The `preparse, postparsing_precmd, and postparsing_postcmd` methods *deprecated* in the previous release * Fixed bug in parsing of multiline commands where matching quote is on another line - update to 0.6.5.1:
Dirk Mueller2025-07-04 09:05:31 +00:00
45d2a824aa
Accepting request 1232033 from devel:languages:python
Ana Guerrero2024-12-19 20:40:14 +00:00
249172a04b
Accepting request 1232033 from devel:languages:python
Ana Guerrero2024-12-19 20:40:14 +00:00
c4b3151610
- Update to version 2.5.8 Bug Fixes * Rolled back undocumented changes to printing functions introduced in 2.5.0.
Steve Kowalik2024-12-19 08:21:07 +00:00
7c3e7ce1f2
Accepting request 1231942 from home:mnhauke
Steve Kowalik2024-12-19 08:21:07 +00:00
7fca6b6cf8
Accepting request 1226013 from devel:languages:python
Ana Guerrero2024-11-26 19:55:21 +00:00
367d525a7a
Accepting request 1226013 from devel:languages:python
Ana Guerrero2024-11-26 19:55:21 +00:00
0b61a039c6
- Update to version 2.5.7 * Fixed issue where argument parsers for overridden commands were not being created.. * Fixed issue where Cmd.ppaged() was not writing to the passed in destination.
Matej Cepl2024-11-23 22:32:42 +00:00
46cbc20cb7
Accepting request 1225968 from home:mnhauke
Matej Cepl2024-11-23 22:32:42 +00:00
8fce606d76
Accepting request 1224394 from devel:languages:python
Ana Guerrero2024-11-15 14:38:22 +00:00
77cce8793f
Accepting request 1224394 from devel:languages:python
Ana Guerrero2024-11-15 14:38:22 +00:00
158893169b
- Update to version 2.5.6 * Fixed type hint for with_default_category decorator which caused type checkers to mistype a subclass of CommandSet as a plain CommandSet. - Update to version 2.5.5 * Fixed type hints for passing a class method to with_argparser and as_subcommand_to. * Fixed issue where set command was not always printing a settable's current value.
Markéta Machová2024-11-15 08:40:30 +00:00
19da392b61
- Update to versino 2.5.4 * Fixed ZeroDivisionError in async_alert() when shutil.get_terminal_size().columns is 0. - Update to version 2.5.3 * Changed CommandSet._cmd to a read-only property which never returns None because it is meant to be called after the CommandSet is registered. This addresses type checker errors that occurred if CommandSet._cmd wasn't cast or checked if None before use.
Matej Cepl2024-11-07 23:51:59 +00:00
d049e7ea01
Accepting request 1222510 from home:mnhauke
Matej Cepl2024-11-07 23:51:59 +00:00
c2f40fbd78
Accepting request 1221615 from devel:languages:python
Ana Guerrero2024-11-06 15:49:23 +00:00
cb1008e97b
Accepting request 1221615 from devel:languages:python
Ana Guerrero2024-11-06 15:49:23 +00:00
7cc1bbd489
- Update to version 2.5.2 * Fixed default pytest execution when not using cmd2's custom invoke command via inv pytest. - Update to version 2.5.1 * Fixed readline bug when using ipy command with gnureadline and Python 3.13. - Add patch: * cmd2-no-coverage-tests.patch
Matej Cepl2024-11-05 21:50:12 +00:00
503c0961fd
Accepting request 1221253 from home:mnhauke
Matej Cepl2024-11-05 21:50:12 +00:00
b28278e34c
- update to 2.4.3: * Fixed ValueError caused when passing Cmd.columnize() strings wider than display_width. * Renamed utils.str_to_bool() -> utils.to_bool(). * Enhanced utils.to_bool() so that it accepts and converts bool, int, and float in addition to str.
Dirk Mueller2023-01-28 14:34:34 +00:00
e8f23d3e85
- update to 2.4.3: * Fixed ValueError caused when passing Cmd.columnize() strings wider than display_width. * Renamed utils.str_to_bool() -> utils.to_bool(). * Enhanced utils.to_bool() so that it accepts and converts bool, int, and float in addition to str.
Dirk Mueller2023-01-28 14:34:34 +00:00
b331e65472
- update to 2.4.1: * Fixed value for ansi.Bg.YELLOW. * Fixed unit tests for ansi.allow_style. * async_alert() raises a RuntimeError if called from the main thread.
Dirk Mueller2022-06-04 15:08:44 +00:00
20f134ae57
- update to 2.4.1: * Fixed value for ansi.Bg.YELLOW. * Fixed unit tests for ansi.allow_style. * async_alert() raises a RuntimeError if called from the main thread.
Dirk Mueller2022-06-04 15:08:44 +00:00
2244e74b39
- update to 2.3.2: * Fixed issue where a ns_provider could be passed None instead of its correct cmd2.Cmd or CommandSet value. * Fixed issue introduced in 2.3.0 with AlternatingTable, BorderedTable, and SimpleTable that caused header alignment settings to be overridden by data alignment settings. * CompletionItems now saves the original object from which it creates a string. * Using CompletionItems as argparse choices is fully supported. * ArgparseCompleter now does the following if a list of CompletionItems was created with numerical types: * Fixed AttributeError in rl_get_prompt() when prompt is None. * Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered. * Fixed bug introduced in cmd2 2.0.0 in which select() converts return values to strings. * Added settings to Column class which prevent a table from overriding existing styles in header and/or data text. This allows for things like nesting an AlternatingTable in another AlternatingTable. * AlternatingTable no longer automatically applies background color to borders. This was done to improve appearance since the background color extended beyond the borders of the table. * Added ability to colorize all aspects of AlternatingTable, BorderedTable, and SimpleTable. * Added support for 8-bit/256-colors with the cmd2.EightBitFg and cmd2.EightBitBg classes. * Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes. * Removed dependency on colorama. * Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class. * To support the color upgrade, all cmd2 colors now inherit from either ansi.FgColor or ansi.BgColor. Therefore, ansi.style() no longer accepts colors as strings.
Dirk Mueller2021-12-06 18:06:27 +00:00
ce18d7acba
- update to 2.3.2: * Fixed issue where a ns_provider could be passed None instead of its correct cmd2.Cmd or CommandSet value. * Fixed issue introduced in 2.3.0 with AlternatingTable, BorderedTable, and SimpleTable that caused header alignment settings to be overridden by data alignment settings. * CompletionItems now saves the original object from which it creates a string. * Using CompletionItems as argparse choices is fully supported. * ArgparseCompleter now does the following if a list of CompletionItems was created with numerical types: * Fixed AttributeError in rl_get_prompt() when prompt is None. * Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered. * Fixed bug introduced in cmd2 2.0.0 in which select() converts return values to strings. * Added settings to Column class which prevent a table from overriding existing styles in header and/or data text. This allows for things like nesting an AlternatingTable in another AlternatingTable. * AlternatingTable no longer automatically applies background color to borders. This was done to improve appearance since the background color extended beyond the borders of the table. * Added ability to colorize all aspects of AlternatingTable, BorderedTable, and SimpleTable. * Added support for 8-bit/256-colors with the cmd2.EightBitFg and cmd2.EightBitBg classes. * Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes. * Removed dependency on colorama. * Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class. * To support the color upgrade, all cmd2 colors now inherit from either ansi.FgColor or ansi.BgColor. Therefore, ansi.style() no longer accepts colors as strings.
Dirk Mueller2021-12-06 18:06:27 +00:00
098697623a
- update to 2.2.0: * Fixed extra space appended to each alias by "alias list" command * New function set_default_ap_completer_type() * Added ArgumentParser.get_ap_completer_type() and ArgumentParser.set_ap_completer_type(). * Added ap_completer_type keyword arg to Cmd2ArgumentParser.__init__() which saves a call to set_ap_completer_type(). This keyword will also work with add_parser() when creating subcommands if the base command's parser is a Cmd2ArgumentParser. * New function register_argparse_argument_parameter() * Using SimpleTable in the output for the following commands * Tab completion of CompletionItems now includes divider row * Removed --verbose flag from set command since descriptions always show now. * All cmd2 built-in commands now populate self.last_result. * Argparse tab completer will complete remaining flag names if there are no more positionals to complete. * Updated async_alert() to account for self.prompt not matching Readline's current prompt. * Deleted `set_choices_provider() and set_completer()` which were deprecated in 2.1.2
Dirk Mueller2021-10-16 21:50:56 +00:00
9d87067891
- update to 2.2.0: * Fixed extra space appended to each alias by "alias list" command * New function set_default_ap_completer_type() * Added ArgumentParser.get_ap_completer_type() and ArgumentParser.set_ap_completer_type(). * Added ap_completer_type keyword arg to Cmd2ArgumentParser.__init__() which saves a call to set_ap_completer_type(). This keyword will also work with add_parser() when creating subcommands if the base command's parser is a Cmd2ArgumentParser. * New function register_argparse_argument_parameter() * Using SimpleTable in the output for the following commands * Tab completion of CompletionItems now includes divider row * Removed --verbose flag from set command since descriptions always show now. * All cmd2 built-in commands now populate self.last_result. * Argparse tab completer will complete remaining flag names if there are no more positionals to complete. * Updated async_alert() to account for self.prompt not matching Readline's current prompt. * Deleted `set_choices_provider() and set_completer()` which were deprecated in 2.1.2
Dirk Mueller2021-10-16 21:50:56 +00:00
b11720804f
- update to 2.1.2: * Added the following accessor methods for cmd2-specific attributes to the argparse.Action class * get_choices_callable() * set_choices_provider() * set_completer() * get_descriptive_header() * set_descriptive_header() * get_nargs_range() * set_nargs_range() * get_suppress_tab_hint() * set_suppress_tab_hint() * Now that set_choices_provider() and set_completer() have been added as methods to the argparse.Action class, the standalone functions of the same name will be removed in version 2.2.0. To update to the new convention, do the following: * Change set_choices_provider(action, provider) to action.set_choices_provider(provider) * Change set_completer(action, completer) to action.set_completer(completer) * Fixed handling of argparse's default options group name which was changed in Python 3.10 * Restored plugins and tests_isolated directories to tarball published to PyPI for cmd2 release
Dirk Mueller2021-07-16 19:59:10 +00:00
cd56d35808
- update to 2.1.2: * Added the following accessor methods for cmd2-specific attributes to the argparse.Action class * get_choices_callable() * set_choices_provider() * set_completer() * get_descriptive_header() * set_descriptive_header() * get_nargs_range() * set_nargs_range() * get_suppress_tab_hint() * set_suppress_tab_hint() * Now that set_choices_provider() and set_completer() have been added as methods to the argparse.Action class, the standalone functions of the same name will be removed in version 2.2.0. To update to the new convention, do the following: * Change set_choices_provider(action, provider) to action.set_choices_provider(provider) * Change set_completer(action, completer) to action.set_completer(completer) * Fixed handling of argparse's default options group name which was changed in Python 3.10 * Restored plugins and tests_isolated directories to tarball published to PyPI for cmd2 release
Dirk Mueller2021-07-16 19:59:10 +00:00
254fae6ad9
- update to 1.4.0: * Fixed tab completion crash on Windows * Changed how multiline doc string help is formatted to match style of other help messages
Dirk Mueller2020-11-26 09:25:34 +00:00
3f9476df1c
- update to 1.4.0: * Fixed tab completion crash on Windows * Changed how multiline doc string help is formatted to match style of other help messages
Dirk Mueller2020-11-26 09:25:34 +00:00
6ef271d09b
- go back to 0.8.9, cliff (which is the only user) is not compatible with >= 0.9.0 atm - Same commit like december, november and october last year.
Dirk Mueller2020-02-27 22:08:52 +00:00
a9bf133138
- go back to 0.8.9, cliff (which is the only user) is not compatible with >= 0.9.0 atm - Same commit like december, november and october last year.
Dirk Mueller2020-02-27 22:08:52 +00:00
4c3abffbfe
- Update to 0.9.22: - Fixed bug where a redefined ansi.style_error was not being used in all cmd2 files - 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. - 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 - 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(). - For consistency between all the print functions: - Made end and chop keyword-only arguments of ppaged() - end is always added to message in ppaged()
Matej Cepl2020-01-03 10:37:15 +00:00
52f65eb482
- Update to 0.9.22: - Fixed bug where a redefined ansi.style_error was not being used in all cmd2 files - 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. - 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 - 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(). - For consistency between all the print functions: - Made end and chop keyword-only arguments of ppaged() - end is always added to message in ppaged()
Matej Cepl2020-01-03 10:37:15 +00:00
df7312e740
Accepting request 755773 from home:mcepl:branches:Cloud:OpenStack:Factory
Matej Cepl2019-12-11 10:02:05 +00:00
98f0bf2dc9
Accepting request 755773 from home:mcepl:branches:Cloud:OpenStack:Factory
Matej Cepl2019-12-11 10:02:05 +00:00