New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no-color-fallback #31
Comments
In general, no.
|
Hello, I wanted to know if this feature was still worked on? |
Hey, I'm open to helping out anyone wanting to take on the work and chat about an overall design - I'm unlikely to work on it myself in the near future. As a vague outline, I would be happy with a solution that:
@Chewie if you'd like to take a look at it I'm happy to help out or explain anything I can - feel free to ping me a draft PR even if you still have questions or it's unfinished. |
I'd be happy to revive this issue and help with this, if you are still open to that, @tommilligan.
Standard library now has equivalent functionality in the form of IsTerminal trait, so perhaps we could use that instead? |
Yes, I'd be very happy with that. There has been recent interest in this as well, ref #125 I have more bandwidth to help with reviews/design than writing code at the moment 👍 |
@tommilligan could you please take a look at smwoj@73f051c and let me know what you think? I tried to keep the diff focused, because I think adding more configurability or abstractions would conflict with existing initiatives in this repo. Examples of using linked commit
using master branch
|
It looks great to me. I wonder if there's an even more generic abstraction we can make (such that everything to be styled goes through a single call), but I think what you've suggested looks good. I would like to see how this interacts with tests/CI, but very on board with what you've linked. |
@tommilligan apologies for this delay, but I didn't have capacity to drive this change in the past 2 weeks. I'll have some capacity this week, so I opened a PR: #127. In addition, I checked what a very similar crate does in this case, because it does handle this case gracefully. It styles the output using Switching to |
ANSI colours aren't available ...
a) when the compiler output is piped, e.g. into an editor or IDE
b) in some terminals without the support
Much like the Rust compiler's warnings are still useful when colour is disabled, it would be nice if this crate's output was just as useful without colour output.
Option 1
Option 2
Do it like Pythons unit test framework
Option 3
use some special chars
Open Questions
The text was updated successfully, but these errors were encountered: