term
term copied to clipboard
Attempt to switch from `term` to `termcolor`
As discussed in slog-rs/slog#267 it appears that the term crate is unmaintained.
This is a draft for switching to term color:
Advantages:
-
termcolor::Writeextendsstd::io::Write(and has unified stderr/stdout times) so we don't have to use the nasty enum -
termcolorhas no custom error type. It just usesstd::io::Error
In general this seems to clean things up significantly. However, it has the following caveats:
Disadvantages/Limitations:
-
termcolorhas no counterpart tosuports_bold. We can't ask "do you support bold?". We can only ask "do you support colors?"
Potential Alternatives:
I think it's good to think about potential alternatives. One alternative is updating to a more modern version of term (like term 0.7)
Here are some other crates listed on the issue:
termcolor (this PR) definitely seems to have less features than term does.
I think crossterm looks extremely promising.
I don't think we should go with yansi because windows support seems second-class.