#!/bin/bash
-# Author: Mike Frysinger <vapier@gmail.com>; released into the public domain; suck it.
+# Written by Mike Frysinger <vapier@gmail.com>. Released into the public domain.
# This is for bash.
BASH_PREFIX="\e"
show_env() {
local c colors=(
- GOOD="\$'${PREFIX}[32;01m'"
- WARN="\$'${PREFIX}[33;01m'"
- BAD="\$'${PREFIX}[31;01m'"
- HILITE="\$'${PREFIX}[36;01m'"
- BRACKET="\$'${PREFIX}[34;01m'"
- NORMAL="\$'${PREFIX}[0m'"
+ GOOD="\$'${PREFIX}[32;1m'"
+ WARN="\$'${PREFIX}[33;1m'"
+ BAD="\$'${PREFIX}[31;1m'"
+ HILITE="\$'${PREFIX}[36;1m'"
+ BRACKET="\$'${PREFIX}[34;1m'"
+ NORMAL="\$'${PREFIX}[m'"
)
for c in "${colors[@]}" ; do
[[ -t 0 ]] || c="${c%=*}="
showit() {
local col="${PREFIX}[${1};${2}m"
- printf '%bthis color is: %s %b\n' "${col}" "${col}" "${PREFIX}[0m"
+ printf '%bthis color is: %s %b\n' "${col}" "${col}" "${PREFIX}[m"
}
main() {
cube|6x6x6)
check256
for n in {16..231} ; do
- showit "38;05" $(printf '%03i' ${n})
+ showit "38;5" $(printf '%03i' ${n})
done
;;
gr[ae]y)
check256
for n in {232..255} ; do
- showit "38;05" ${n}
+ showit "38;5" ${n}
done
;;
all|256)