-
Notifications
You must be signed in to change notification settings - Fork 83
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
Commit 4af2de0 breaks coloring #69
Comments
This requires CLICOLOR_FORCE to be set in the prompt because colored now detects this as a TTY and refuses to add color escape codes. See this issue for details: colored-rs/colored#69
Hi @klingtnet Could you please run the examples at atty and see what you get? I cloned your repo, ran a |
The examples run fine and rusty-prompt also has colors when run as a simple command but not when it is executed to generate the shell prompt: https://github.com/klingtnet/dotfiles/blob/02c2bacd31b255afac8ee6a69ffb8279e876bc70/dots/.bashrc#L17 |
Hi @klingtnet I see your issue now. You can fix it by adding Below is my testing on your repo and it is working. |
Fixes !github.com/colored-rs/colored/issues/69
Thank you very much, I can confirm that it works now! |
This is useful when generating shell prompts because in this case the TTY check fails but colors are supported. Even though the link below is for a Rust library the problem is the same: colored-rs/colored#69
This is useful when generating shell prompts because in this case the TTY check fails but colors are supported. Even though the link below is for a Rust library the problem is the same: colored-rs/colored#69
This is useful when generating shell prompts because in this case the TTY check fails but colors are supported. Even though the link below is for a Rust library the problem is the same: colored-rs/colored#69
I use
colored
in a small tool that generates my shell prompt (rusty-prompt).After updating colored from 1.8.0 to 1.9.0 I noticed that my shell prompt was not colored anymore, neither in bash nor in zsh. I then compiled rusty-prompt against all commits between 1.8.0 and 1.9.0 of colored and figured out that this commit broke the coloring for me: 4af2de0 .
The reason seems to be that
colored
now wrongly detects my terminal as TTY.The text was updated successfully, but these errors were encountered: