From ea2a7d521a38185cdf2619f5a47a027c1cdefa1c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 5 Apr 2012 16:28:34 -0400 Subject: [PATCH] add color export for other scripts --- .bin/bash-colors | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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" -- 2.39.5