commit 232a1323fba95d8d3680b32771935783c8788fb5 parent f55f162b3598b972ba9ae3fa420ea6fe4fd567c2 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 27 May 2019 12:29:42 +0200 Show text styling capabilities Diffstat:
M | .local/bin/colors-256.sh | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/.local/bin/colors-256.sh b/.local/bin/colors-256.sh @@ -1,7 +1,14 @@ #!/usr/bin/env bash -for i in {0..255} ; do + +for i in $(seq 0 255); do printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i" if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then printf "\n"; fi done + +printf "regular text, " +printf "\e[1mbold text\e[0m, " +printf "\e[3mitalic text\e[0m, " +printf "\e[4munderline text\e[0m, " +printf "\e[9mstrikethrough text\e[0m\n"