mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-02-21 23:36:37 +00:00
Color support for more xterms
This commit is contained in:
parent
667bfd7350
commit
3f8ac03553
2
main.sh
2
main.sh
@ -54,8 +54,8 @@ function _fmt () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
color_reset="\x1b[0m"
|
color_reset="\x1b[0m"
|
||||||
if [ "${TERM}" != "xterm" ] || [ -t 1 ]; then
|
|
||||||
local color_reset="\x1b[0m"
|
local color_reset="\x1b[0m"
|
||||||
|
if [[ "${TERM}" != "xterm"* ]] || [ -t 1 ]; then
|
||||||
# Don't use colors on pipes or non-recognized terminals
|
# Don't use colors on pipes or non-recognized terminals
|
||||||
color=""
|
color=""
|
||||||
color_reset=""
|
color_reset=""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user