-
Couldn't load subscription status.
- Fork 124
Description
Now that cmd2 2.5.0 is out, I'd like to start thinking about cmd2 3.0.0. So here are a few features I'd like to see based on feedback we've received over the years.
-
Full
richandrich-argparseintegration.-
I wrote the table and related formatting code in early 2020 to solve a problem that all existing table creators at the time had. None of them preserved text styles across multiple lines of a table cell. That was also right around the time
richwas developing their table functionality so I wasn't aware of their library. In the years since,richhas become the de facto library for formatting text in the terminal and it's widely used and well supported. So I think it's safe at this point to offload all of our text formatting torich. This approach was also discussed in Regarding KISS and direction of the project #1251 . -
I have been testing our stuff with
rich-argparseand I'm finding the switch very easy.
-
-
Make async alerts and prompt changes event driven.
- Currently developers must obtain
self.terminal_lockto asynchronously print an alert. Incmd2 3.0they will call a function likeadd_alert()which adds to a queue andcmd2will handle printing alerts when the prompt is on screen. Async prompt updates will provide a similar method.
- Currently developers must obtain
-
Consider moving some built-in commands to
CommandSetsor mixin classes.- What commands are best suited for this?
-
Remove macros.
- They were a neat idea at the time, but as 1350 points out, the lack of custom tab completion makes them difficult and confusing to use. Removing macros also eliminates the need for
self._input_line_to_statement(). We could just callself._complete_statement()directly. - No longer removing macros since people are using them. I added ability to develop custom macro tab completion.
- They were a neat idea at the time, but as 1350 points out, the lack of custom tab completion makes them difficult and confusing to use. Removing macros also eliminates the need for
-
Modernize build system to be based on pyproject.toml #1334
- Moving the
ext_testplugin might help here as well. It currently has its own build system and is required to run our unit tests. Can it become a part of the maincmd2code or at least not be needed to run our unit tests?
- Moving the