{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry/cli/issues/840","repository_url":"https://api.github.com/repos/cloudfoundry/cli","labels_url":"https://api.github.com/repos/cloudfoundry/cli/issues/840/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/cli/issues/840/comments","events_url":"https://api.github.com/repos/cloudfoundry/cli/issues/840/events","html_url":"https://github.com/cloudfoundry/cli/issues/840","id":154469465,"number":840,"title":"ansi colors not displayed within linux watch command","user":{"login":"gberche-orange","id":4748380,"avatar_url":"https://avatars.githubusercontent.com/u/4748380?v=3","gravatar_id":"","url":"https://api.github.com/users/gberche-orange","html_url":"https://github.com/gberche-orange","followers_url":"https://api.github.com/users/gberche-orange/followers","following_url":"https://api.github.com/users/gberche-orange/following{/other_user}","gists_url":"https://api.github.com/users/gberche-orange/gists{/gist_id}","starred_url":"https://api.github.com/users/gberche-orange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gberche-orange/subscriptions","organizations_url":"https://api.github.com/users/gberche-orange/orgs","repos_url":"https://api.github.com/users/gberche-orange/repos","events_url":"https://api.github.com/users/gberche-orange/events{/privacy}","received_events_url":"https://api.github.com/users/gberche-orange/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cloudfoundry/cli/labels/scheduled","name":"scheduled","color":"BFD4F2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-12T12:24:25Z","updated_at":"2016-05-12T18:17:44Z","closed_at":null,"body":"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 version\r\n\r\nnb: some [related diagnostic](http://askubuntu.com/questions/423672/why-dont-git-colours-appear-when-using-watch) in some other cf-unrelated cli commands\r\n\r\n### Command\r\n\r\n``watch -c cf a``\r\n\r\n### CLI Version\r\n\r\nReproduces in \r\n\r\n```\r\n$ cf-6.17.1 -v\r\ncf version 6.17.1+2ca614d-2016-05-02\r\n\r\n$ cf -v\r\ncf version 6.18.0+b22884b-2016-05-10\r\n```\r\n\r\n### Platform Details\r\n\r\nUbuntu:\r\n\r\n```\r\n$ cat /etc/lsb-release \r\nDISTRIB_ID=Ubuntu\r\nDISTRIB_RELEASE=15.10\r\nDISTRIB_CODENAME=wily\r\nDISTRIB_DESCRIPTION=\"Ubuntu 15.10\"\r\n``` \r\n\r\n### Shell\r\n\r\nBash\r\n\r\n```\r\n$ bash --version\r\nGNU bash, version 4.3.42(1)-release (x86_64-pc-linux-gnu)\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cloudfoundry/cli/issues/comments/218841595","html_url":"https://github.com/cloudfoundry/cli/issues/840#issuecomment-218841595","issue_url":"https://api.github.com/repos/cloudfoundry/cli/issues/840","id":218841595,"user":{"login":"XenoPhex","id":291961,"avatar_url":"https://avatars.githubusercontent.com/u/291961?v=3","gravatar_id":"","url":"https://api.github.com/users/XenoPhex","html_url":"https://github.com/XenoPhex","followers_url":"https://api.github.com/users/XenoPhex/followers","following_url":"https://api.github.com/users/XenoPhex/following{/other_user}","gists_url":"https://api.github.com/users/XenoPhex/gists{/gist_id}","starred_url":"https://api.github.com/users/XenoPhex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XenoPhex/subscriptions","organizations_url":"https://api.github.com/users/XenoPhex/orgs","repos_url":"https://api.github.com/users/XenoPhex/repos","events_url":"https://api.github.com/users/XenoPhex/events{/privacy}","received_events_url":"https://api.github.com/users/XenoPhex/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T18:17:44Z","updated_at":"2016-05-12T18:17:44Z","body":"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.\r\n\r\nThere is no way to cleanly force colors to be on for these situations."}}