Comment 31 for bug 103929

Revision history for this message
Victor Engmark (victor-engmark) wrote :

How does non-color terminals deal with color prompts? If you `echo -e '\e[1;34mtest\e[0m'` on a terminal without support, does it come out garbled? If so, couldn't that be a test of color support? echo something with formatting, then check that the string output to stdout is only that between the formatting expressions. Or is it possible to use one of the solutions mentioned in http://stackoverflow.com/questions/2465425/how-do-i-determine-if-a-terminal-is-color-capable: `tput colors 2` or `man terminfo`?