aboutsummaryrefslogtreecommitdiff
path: root/bin/color
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-12 08:15:20 -0300
committerEuAndreh <eu@euandre.org>2023-04-12 08:15:20 -0300
commitc6188975d2da6c1696c4433f6fce8ae4c9a6ac38 (patch)
tree613545634bc999385d13ecb107d2cce113ba11c4 /bin/color
parentbin/: Add trailing semicolor to Perl heredocs (diff)
downloaddotfiles-c6188975d2da6c1696c4433f6fce8ae4c9a6ac38.tar.gz
dotfiles-c6188975d2da6c1696c4433f6fce8ae4c9a6ac38.tar.xz
bin/: Make help string more consistent across several executables
Diffstat (limited to '')
-rwxr-xr-xbin/color10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/color b/bin/color
index 240da874..a4160792 100755
--- a/bin/color
+++ b/bin/color
@@ -13,19 +13,24 @@ usage() {
help() {
cat <<-'EOF'
+
Options:
- -c COLOR
+ -c COLOR color name
-h, --help show this message
+ TEXT literal string to be coloured
+
- Print the given text with a color.
+ Print TEXT using COLOR.
The available colors are:
EOF
+
list_colors | sed 's/^/ /'
cat <<-'EOF'
+
Examples:
Print "banana" in yellow:
@@ -33,6 +38,7 @@ help() {
$ color -c yellow 'banana'
banana
+
Print "grass" in green, with a newline:
$ color -c green 'grass\n'