0
When I attempt to restore a MacOS terminal window's default color by executing the following:
osascript -e "tell application \"Terminal\" to set current settings of window 1 to settings set \"Homebrew\""
the Terminal background color is restored to the Homebrew default, but not the foreground color. Doing it explicitly also has no effect:
osascript -e 'tell application "Terminal" to set normal text color of window 1 to {47802, 61423, 16448, 0}'
Oddly, when I execute an ls (LSCOLORS are on) immediately after the above, colors are restored to the correct state. Any idea what might be going on or how to fix it?
Also, there's nothing in the PS string to change the color as part of the prompt. Hitting return a couple times has no effect. Neither does executing something harmless like echo. Thanks!
As expected, Didn't work :-) (It's also AS 2.7 on 10.13.6)
I did track things down a bit more. The color change is in a function that changes colors, ssh's into a remote system, and then when ssh terminates, restores the colors. The remote system's shell does mess with the colors in its PS2 variable (which is why I want to put them back). I found that if I remove the color changes from the remote system PS2, that things work correctly, so it seems to be some odd interaction with ssh. – aholub – 2018-09-07T00:37:38.023