Migrate from termcolor to anstream #12627
Labels
A-cli
Area: Command-line interface, option parsing, etc.
A-console-output
Area: Terminal output, colors, progress bar, etc.
C-cleanup
Category: cleanup within the codebase
anstream
provides the same feature set astermcolor
(including legacy windows support) but with a less awkward API to work with. Instead of hand-constructing data in a special container with each step requiring setting the style, you use whatever styling library you like (e.g. color-print like in #12578) and then write to the appropriate stream, and you are done. The stream does all the rest, allowing styling to be decoupled from where it is being rendered.So
anstream
would replacetermcolor
fwdansi
strip-ansi-escapes
Benefits
Shell
in control (seecargo add
s use ofShell::write_stderr
)fwdansi
toanstream
strip-ansi-escapes
Shell
(currently using termcolor) andclap
(usinganstyle
)The text was updated successfully, but these errors were encountered: