To set my terminal theme, I typically use a script which prints ANSI control sequences. For example,
echo -e "\033]11;rgb:20/20/30\033\\"
sets the background color to RBG #202030. This works with git-bash+mintty, and it works with WSL+Windows Terminal. Unfortunately, it does not work with git-bash+Windows Terminal. Instead, it just outputs a \
with no change to the color scheme.
Does anyone have ideas for troubleshooting this?
A couple things I've tried:
- Try to output colored text, e.g.,
echo -e "\033[44m\033[37m Test \033[0m"
. This works just fine. - Check the $TERM environment variable. It is equal to
xterm-256color
, just the same as in WSL (which works).
In case it matters, here's the command setting I'm using in Windows Terminal to launch git bash:
"commandline": "C:/Program Files/Git/usr/bin/bash.exe -i -l",