how to get current terminal color pair in bash -
I would like to query and store existing terminal color combinations in BASH eg:
# ! / Bin / bash #some ANSI color escape sequence red = "0 0 [0; 31m" grn = "\ 033 [0; 32m" blue = "\ 033 [0; 34m" DRF = "\ 033 [0 ; 00m "# default echo -e" Change $ {red} from $ {blu} blue to default at $ {def}. "# Now store the existing color (which is blue) such as: cur = ??? ? Change to Echo -e "$ {grn} green and back to $ {cur}" echo -e "what was before me, it will be in blue if the radius of the variable is: 0; 34 meters." Exit Echo -e "default $ {def}" 0 The answer that delivers me how to capture the current color
cur = ? ???
The question was about current color , not that Cursor position .
Both are "non-standard" (though later, the position of the cursor is applied by a valid claim for the "VT100 emulator").
However, xterm applies a set of escape sequences that are referred to as dynamic colors , which occur before the ANSI color functionality, including text foreground and background. I set an action color to modify an app "?" Instead of telling the xterm to return the color value to a color, e.g.,
OSC 1 1? Using the marking given in ST
Comments
Post a Comment