A resposta foi realmente muito mais simples. Em vez de usar \e
para o caractere de escape, use 3
. Então vai de
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
export COLOR_BLUE='\e[0;34m'
export COLOR_LIGHT_BLUE='\e[1;34m'
export COLOR_GREEN='\e[0;32m'
export COLOR_LIGHT_GREEN='\e[1;32m'
export COLOR_CYAN='\e[0;36m'
export COLOR_LIGHT_CYAN='\e[1;36m'
export COLOR_RED='\e[0;31m'
export COLOR_LIGHT_RED='\e[1;31m'
export COLOR_PURPLE='\e[0;35m'
export COLOR_LIGHT_PURPLE='\e[1;35m'
export COLOR_BROWN='\e[0;33m'
export COLOR_YELLOW='\e[1;33m'
export COLOR_GRAY='\e[1;30m'
export COLOR_LIGHT_GRAY='\e[0;37m'
para:
# Setup some colors to use later in interactive shell or scripts
export COLOR_NC='3[0m' # No Color
export COLOR_WHITE='3[1;37m'
export COLOR_BLACK='3[0;30m'
export COLOR_BLUE='3[0;34m'
export COLOR_LIGHT_BLUE='3[1;34m'
export COLOR_GREEN='3[0;32m'
export COLOR_LIGHT_GREEN='3[1;32m'
export COLOR_CYAN='3[0;36m'
export COLOR_LIGHT_CYAN='3[1;36m'
export COLOR_RED='3[0;31m'
export COLOR_LIGHT_RED='3[1;31m'
export COLOR_PURPLE='3[0;35m'
export COLOR_LIGHT_PURPLE='3[1;35m'
export COLOR_BROWN='3[0;33m'
export COLOR_YELLOW='3[1;33m'
export COLOR_GRAY='3[1;30m'
export COLOR_LIGHT_GRAY='3[0;37m'