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
ansi colors not displayed within linux watch command #840
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/119446319 The labels on this github issue will be updated when the story is started. |
Recently the CF CLI switched color libraries in order to support windows. This color library is significantly more robust for things like supporting the same colors, highlighting words, etc. However, it also detects whether you are in a TTY session. If you are not in a TTY session, this library will automatically not output colors. Whenever you run a CF command inside another command or pipe it through a series of commands, the command knows it's not in a TTY and will not output colors. There is no way to cleanly force colors to be on for these situations. |
thanks @XenoPhex for looking int this issue. Any chance to contribute to this library to add a configureable mode to bypass the tty detection and force color output ? In terms of UX for cf cli, this could end-up in new accepted values for the CF_COLORS env var
This would be similar to common pattern used in
|
This also affects the cc @xoebus |
We'd like to address this issue in the next release. ls and grep default to always but commonly aliased to Rather than introducing a new environment variable, would a global |
@dkoper thanks for priorizing this issue. +1 for your proposal to add a |
Sorry, I'd like to take that back, I had missed we already expose CF_COLOR! Instead, I'd like to address this by fixing the behaviour of this environment variable as it was before: At the same time, I'd like to extend Would that work for you? |
Hi @gberche-orange we are closing this issue due to inactivity. Also watch does not function for this type of behaviour (note the control characters):
|
@XenoPhex sorry for the late response to dkoper in #840 (comment). This suggestion seem fine to me. I'm not sure what you mean by " watch does not function for this type of behaviour (note the control characters)", which indeed seems the problem I reported into this issue. I'm not reproducing the bug in the
Note the
|
Starting with 6.17.1 the
watch -c cf a
is not displaying colors anymore. Suspecting that the colors improvements brought in 6.17.1 are misleadingly detecting the "watch-exposed terminal" as not supporting colors, and regressed. The same command is properly displaying colors in 6.17.0 versionnb: some related diagnostic in some other cf-unrelated cli commands
Command
watch -c cf a
CLI Version
Reproduces in
Platform Details
Ubuntu:
Shell
Bash
The text was updated successfully, but these errors were encountered: