I tried to change the color of code output which redirected to zsh integrated terminal at VS Code (macOS)but with no result. It's quite simple to change the Theme in settings or only text/background/cursor color but it's quite challenging to change only colour of code output (I want to do this in order to make it easier to see where is output of my script and where is terminal data).
Firstly I tried this at settings.json:
"terminal.integrated.shellArgs.windows": [
"-dumb",
"-c",
"echo -e '\\e[31m'"
]
But VS Code told me:
This is now deprecated. recommendation tells: 'the new recommended way to configure your default shell is by creating a terminal profile in
terminal.integrated.profiles.windows
and setting its profile name as the default interminal.integrated.defaultProfile.windows
. This will currently take priority over the new profiles settings but that will change in the future.`
Next step was trying this:
"zsh": {
"path": "zsh",
"args": [
"-l",
"echo '\u001b[31m'"
]
}
But I got this error:
The terminal process "/bin/zsh '-l', 'echo '[31m''" failed to launch (exit code: 127).
I know that it's possible to use such constructions in the code
print("\033[34mHello, world!\033[0m")
but... Is it possible to set up VS Code?