From: Mike Frysinger Date: Thu, 5 Apr 2012 20:28:34 +0000 (-0400) Subject: add color export for other scripts X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ea2a7d521a38185cdf2619f5a47a027c1cdefa1c;p=home.git add color export for other scripts --- diff --git a/.bin/bash-colors b/.bin/bash-colors index bef5130..b2182b4 100755 --- a/.bin/bash-colors +++ b/.bin/bash-colors @@ -1,4 +1,21 @@ #!/bin/bash + +if [[ $1 == "--env" ]] ; then + colors=( + GOOD="\$'\e[32;01m'" + WARN="\$'\e[33;01m'" + BAD="\$'\e[31;01m'" + HILITE="\$'\e[36;01m'" + BRACKET="\$'\e[34;0m'" + NORMAL="\$'\e[0m'" + ) + for c in "${colors[@]}" ; do + echo "${c}" + done + + exit 0 +fi + for i in {0..1} ; do for j in {30..37} ; do echo -e '\e['"${i};${j}mthis color is: \\\\e[${i};${j}m"