From aed65ec04f4037d0bda5b97125d9a98d7a3ab4be Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 30 Jul 2021 12:36:50 -0700 Subject: [PATCH] add argument checking to colors --- sh/colors | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/colors b/sh/colors index 10e94d7..98fbf45 100755 --- a/sh/colors +++ b/sh/colors @@ -4,6 +4,7 @@ # NO_DASH colors() { + [ $# -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} }