ansi-color: Inform about the background option textually
This commit is contained in:
parent
df0c96d8bc
commit
3c799ae129
|
@ -10,14 +10,12 @@ function _ansi-colors_8()
|
||||||
local start="${2}"
|
local start="${2}"
|
||||||
|
|
||||||
print "\e[1;97m${title}:\e[0m"
|
print "\e[1;97m${title}:\e[0m"
|
||||||
print "Regular Bold Underline Italic Crossed Dim Blinking Reversed Background"
|
print "Regular Bold Underline Italic Crossed Dim Blinking Reversed"
|
||||||
for n in {${start}..$(( ${start}+7 ))}; do
|
for n in {${start}..$(( ${start}+7 ))}; do
|
||||||
local nbg=$(( ${n}+10 ))
|
|
||||||
print -c "\e[0;${n}m\\\e[0;${n}m\e[m" "\e[1;${n}m\\\e[1;${n}m\e[m" \
|
print -c "\e[0;${n}m\\\e[0;${n}m\e[m" "\e[1;${n}m\\\e[1;${n}m\e[m" \
|
||||||
"\e[4;${n}m\\\e[4;${n}m\e[m" "\e[3;${n}m\\\e[3;${n}m\e[m" \
|
"\e[4;${n}m\\\e[4;${n}m\e[m" "\e[3;${n}m\\\e[3;${n}m\e[m" \
|
||||||
"\e[9;${n}m\\\e[9;${n}m\e[m" "\e[2;${n}m\\\e[2;${n}m\e[m" \
|
"\e[9;${n}m\\\e[9;${n}m\e[m" "\e[2;${n}m\\\e[2;${n}m\e[m" \
|
||||||
"\e[5;${n}m\\\e[5;${n}m\e[m" \
|
"\e[5;${n}m\\\e[5;${n}m\e[m" "\e[7;${n}m\\\e[7;${n}m\e[m"
|
||||||
"\e[7;${n}m\\\e[7;${n}m\e[m" "\e[${nbg}m\\\e[${nbg}m\e[m"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,14 +33,16 @@ function _ansi-colors_256()
|
||||||
done
|
done
|
||||||
print -C 6 -a ${colours}
|
print -C 6 -a ${colours}
|
||||||
|
|
||||||
print "\n\e[1;97m256 colour background:\e[0m 48 instead of 38"
|
print "\e[1;97mBackground:\e[0m 48 instead of 38"
|
||||||
print "\e[1;97mTrue colour:\e[0m \\\e[38;2;\e[0;31mR\e[0m;\e[0;32mG\e[0m;\e[0;34mB\e[0mm" \
|
print "\n\e[1;97mTrue colour:\e[0m \\\e[38;2;\e[0;31mR\e[0m;\e[0;32mG\e[0m;\e[0;34mB\e[0mm" \
|
||||||
"and \\\e[48;2;\e[0;41mR\e[0m;\e[0;42mG\e[0m;\e[0;44mB\e[0mm"
|
"and \\\e[48;2;\e[0;41mR\e[0m;\e[0;42mG\e[0m;\e[0;44mB\e[0mm"
|
||||||
}
|
}
|
||||||
|
|
||||||
_ansi-colors_8 "Classic colours" 30
|
_ansi-colors_8 "Classic colours" 30
|
||||||
print
|
print "\e[1;97mBackground:\e[0m 40-47 instead of to 30-37\n"
|
||||||
|
|
||||||
_ansi-colors_8 "High intensity colours" 90
|
_ansi-colors_8 "High intensity colours" 90
|
||||||
|
print "\e[1;97mBackground:\e[0m 100-107 instead of 90-97"
|
||||||
|
|
||||||
[[ -v 1 && "${1[1]}" == "8" ]] || _ansi-colors_256
|
[[ -v 1 && "${1[1]}" == "8" ]] || _ansi-colors_256
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue