diff bin/termcolors.sh @ 145:c3ca45204c4e

Documentation.
author Edho Arief <edho@myconan.net>
date Sun, 02 Oct 2011 04:28:49 +0700
parents 1783152a1fe6
children 73e90355bbd7
line wrap: on
line diff
--- a/bin/termcolors.sh	Sun Oct 02 04:17:53 2011 +0700
+++ b/bin/termcolors.sh	Sun Oct 02 04:28:49 2011 +0700
@@ -1,5 +1,23 @@
 #!/bin/sh
 
+# Usage:
+#   _c [bold_|]<color> <text>
+#
+#   <color> can be one of:
+#     black, blue, green, cyan, red, purple, brown, gray
+#   Prefix the color with bold_ to use bold style/light color.
+#
+# Example:
+#   To print word "Hello" in bold blue:
+#     _c bold_blue "Hello"
+#
+#   To print text with only one word colored:
+#     echo "Hello, $(c green world)."
+#
+# To do:
+#   Support for background color, underline, etc.
+#
+
 _c() {
   color_name="${1}"
   shift