about summary refs log tree commit diff
path: root/Functions/Misc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-04 22:57:19 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-04 22:57:19 +0000
commitd3170c8ee6eb6aa6050d6531536e5e9fba278b57 (patch)
tree4be666df9d3dcce75a68560c44f40b6efe79c24d /Functions/Misc
parent298c35419d8da664ba22f9daa26758798da390d4 (diff)
downloadzsh-d3170c8ee6eb6aa6050d6531536e5e9fba278b57.tar.gz
zsh-d3170c8ee6eb6aa6050d6531536e5e9fba278b57.tar.xz
zsh-d3170c8ee6eb6aa6050d6531536e5e9fba278b57.zip
Initial revision
Diffstat (limited to 'Functions/Misc')
-rw-r--r--Functions/Misc/colors67
1 files changed, 67 insertions, 0 deletions
diff --git a/Functions/Misc/colors b/Functions/Misc/colors
new file mode 100644
index 000000000..8ce2326e6
--- /dev/null
+++ b/Functions/Misc/colors
@@ -0,0 +1,67 @@
+# Put standard ANSI color codes in environment for easy use
+
+reset_color="$(echo -n '\e[0m')"
+bold_color="$(echo -n '\e[1m')"
+
+# Foreground
+
+fg_grey="$(echo -n '\e[30m')"
+fg_red="$(echo -n '\e[31m')"
+fg_green="$(echo -n '\e[32m')"
+fg_yellow="$(echo -n '\e[33m')"
+fg_blue="$(echo -n '\e[34m')"
+fg_magenta="$(echo -n '\e[35m')"
+fg_cyan="$(echo -n '\e[36m')"
+fg_white="$(echo -n '\e[37m')"
+
+fg_no_bold_grey="$(echo -n '\e[0;30m')"
+fg_no_bold_red="$(echo -n '\e[0;31m')"
+fg_no_bold_green="$(echo -n '\e[0;32m')"
+fg_no_bold_yellow="$(echo -n '\e[0;33m')"
+fg_no_bold_blue="$(echo -n '\e[0;34m')"
+fg_no_bold_magenta="$(echo -n '\e[0;35m')"
+fg_no_bold_cyan="$(echo -n '\e[0;36m')"
+fg_no_bold_white="$(echo -n '\e[0;37m')"
+
+fg_bold_grey="$(echo -n '\e[1;30m')"
+fg_bold_red="$(echo -n '\e[1;31m')"
+fg_bold_green="$(echo -n '\e[1;32m')"
+fg_bold_yellow="$(echo -n '\e[1;33m')"
+fg_bold_blue="$(echo -n '\e[1;34m')"
+fg_bold_magenta="$(echo -n '\e[1;35m')"
+fg_bold_cyan="$(echo -n '\e[1;36m')"
+fg_bold_white="$(echo -n '\e[1;37m')"
+
+# Background
+
+bg_grey="$(echo -n '\e[40m')"
+bg_red="$(echo -n '\e[41m')"
+bg_green="$(echo -n '\e[42m')"
+bg_yellow="$(echo -n '\e[43m')"
+bg_blue="$(echo -n '\e[44m')"
+bg_magenta="$(echo -n '\e[45m')"
+bg_cyan="$(echo -n '\e[46m')"
+bg_white="$(echo -n '\e[47m')"
+
+bg_no_bold_grey="$(echo -n '\e[0;40m')"
+bg_no_bold_red="$(echo -n '\e[0;41m')"
+bg_no_bold_green="$(echo -n '\e[0;42m')"
+bg_no_bold_yellow="$(echo -n '\e[0;43m')"
+bg_no_bold_blue="$(echo -n '\e[0;44m')"
+bg_no_bold_magenta="$(echo -n '\e[0;45m')"
+bg_no_bold_cyan="$(echo -n '\e[0;46m')"
+bg_no_bold_white="$(echo -n '\e[0;47m')"
+
+bg_bold_grey="$(echo -n '\e[1;40m')"
+bg_bold_red="$(echo -n '\e[1;41m')"
+bg_bold_green="$(echo -n '\e[1;42m')"
+bg_bold_yellow="$(echo -n '\e[1;43m')"
+bg_bold_blue="$(echo -n '\e[1;44m')"
+bg_bold_magenta="$(echo -n '\e[1;45m')"
+bg_bold_cyan="$(echo -n '\e[1;46m')"
+bg_bold_white="$(echo -n '\e[1;47m')"
+
+# Stop these screwing the environment listing up
+bg_zzzz=$reset_color
+fg_zzzz=$reset_color
+bold_zzzz=$reset_color