1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-28 18:17:11 -07:00
rc/sh/colors

14 lines
435 B
Bash
Executable File

#!/usr/bin/env bash
# YES_ZSH
# YES_BASH
# NO_DASH
colors() { ### @-
### print out all the foreground and background terminal color combinations.
### excluding boilerplate, this script is a mere a 76-characters long!
[ $# -eq 0 ] || { printf "%s\n" "$0: does not take arguments" >&2; return 1; }
printf "\e[%dm$(printf " \e[%dm mV \e[40m" {4,10}{0..7})\e[0m\n" {3,9}{0..7}
}
[ "${SOURCING:-0}" -gt 0 ] || colors "$@"