aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-08-12 18:54:53 -0300
committerEuAndreh <eu@euandre.org>2022-08-12 18:54:53 -0300
commit9a3a2e87235098d67072848589764e7d25832bf1 (patch)
treeeba32bf99f8f02af6d1fe06224e0019339c625a9
parentbin/assert-arg: Add helper utility (diff)
downloaddotfiles-9a3a2e87235098d67072848589764e7d25832bf1.tar.gz
dotfiles-9a3a2e87235098d67072848589764e7d25832bf1.tar.xz
bin/color: Add "Examples" section to help string
-rwxr-xr-xbin/color18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/color b/bin/color
index 0597278..d03a232 100755
--- a/bin/color
+++ b/bin/color
@@ -12,15 +12,31 @@ usage() {
help() {
cat <<-'EOF'
-
Options:
-c COLOR
-h, --help show this message
+ Print the given text with a color.
+
The available colors are:
EOF
list_colors | sed 's/^/ /'
+
+ cat <<-'EOF'
+
+ Examples:
+
+ Print "banana" in yellow:
+
+ $ color -c yellow 'banana'
+ banana
+
+ Print "grass" in green, with a newline:
+
+ $ color -c green 'grass\n'
+ grass
+ EOF
}