You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Git has an (somewhat inconsistent) set of "color = always" options to override the automated terminal detection. Demo of one of the (too many) options:
git diff # colored :-)
git diff | less # not colored :-(
git diff --color=always | less -R # colored again! :-(
It would nice for west to offer the same feature.
While rarer, color=never is sometimes needed too. For instance some CI engines try hard to pretend they are terminals to capture colors but then can fail to display them for some reason.
The text was updated successfully, but these errors were encountered:
In west, colorama handles terminal detection. The following and BARELY TESTED hack seems equivalent to color=always
--- a/src/west/app/main.py+++ b/src/west/app/main.py@@ -895,7 +895,7 @@ def main(argv=None):
# Makes ANSI color escapes work on Windows, and strips them when
# stdout/stderr isn't a terminal
- colorama.init()+ colorama.init(strip=False)
# Create the WestApp instance and let it run.
app = WestApp()
west diff | less -R # color!
west diff | less # as expected, color mojikabe :-(
Git has an (somewhat inconsistent) set of "color = always" options to override the automated terminal detection. Demo of one of the (too many) options:
It would nice for
west
to offer the same feature.While rarer,
color=never
is sometimes needed too. For instance some CI engines try hard to pretend they are terminals to capture colors but then can fail to display them for some reason.The text was updated successfully, but these errors were encountered: