Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
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. |
cf-gitbot
added
unscheduled
scheduled
and removed
unscheduled
labels
May 12, 2016
|
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. |
cf-gitbot
added
unscheduled
and removed
scheduled
labels
May 12, 2016
gberche-orange
commented
May 13, 2016
|
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
|
cf-gitbot
added
in progress
scheduled
unscheduled
and removed
unscheduled
in progress
scheduled
labels
May 21, 2016
|
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 |
gberche-orange
commented
Aug 31, 2016
|
@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? |
gberche-orange commentedMay 12, 2016
•
Edited 1 time
-
gberche-orange
May 12, 2016
Starting with 6.17.1 the
watch -c cf ais 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 aCLI Version
Reproduces in
Platform Details
Ubuntu:
Shell
Bash