I use git for version controlling my configuration. A git status shows colorized output for changed files. But when I use a git diff .gitignore the colors are not showing. Instead I get to see the literal escape codes.
Using hassio latest, ssh with different ssh clients from different machines.
Please note, terminal colors are working in general, but not with git diff.
I ran into this just now and investigated a bit. The issue is that git by default uses less to page the output of its commands, and less on Hass.io is a stripped-down version provided by busybox that does not have color support.
Two workarounds:
git config --global core.pager cat)OR
less (apk --no-cache add less)It would be nice if a future version of Hass.io could ship with a full version of less so that this workaround is not necessary.
This issue was moved by frenck to home-assistant/hassio-addons#410.
Most helpful comment
I ran into this just now and investigated a bit. The issue is that
gitby default useslessto page the output of its commands, andlesson Hass.io is a stripped-down version provided bybusyboxthat does not have color support.Two workarounds:
git config --global core.pager cat)OR
less(apk --no-cache add less)It would be nice if a future version of Hass.io could ship with a full version of
lessso that this workaround is not necessary.