From d0f1ede34b1008a5a7cb2370f6698f2df79bef86 Mon Sep 17 00:00:00 2001 From: Jeremy Seago Date: Mon, 12 Sep 2016 22:59:30 -0500 Subject: [PATCH] sets necessary environment variables to add colors to man pages --- modules/colorized-man-pages/README.md | 11 +++++++++++ modules/colorized-man-pages/functions/man | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 modules/colorized-man-pages/README.md create mode 100644 modules/colorized-man-pages/functions/man diff --git a/modules/colorized-man-pages/README.md b/modules/colorized-man-pages/README.md new file mode 100644 index 0000000..e8481e6 --- /dev/null +++ b/modules/colorized-man-pages/README.md @@ -0,0 +1,11 @@ +Colorized Man Pages +=================== + +Provides environment variables necessary to add color to `man` pages. + +This module will make use of `man` + +Functions +--------- + + * `man` sets environment variables and then passes through to system `man` command. Syntax is `man zsh` diff --git a/modules/colorized-man-pages/functions/man b/modules/colorized-man-pages/functions/man new file mode 100644 index 0000000..262f465 --- /dev/null +++ b/modules/colorized-man-pages/functions/man @@ -0,0 +1,10 @@ +# vim: filetype=sh: +# Colorize man pages +LESS_TERMCAP_mb=$'\e[1;31m' \ +LESS_TERMCAP_md=$'\e[1;31m' \ +LESS_TERMCAP_me=$'\e[0m' \ +LESS_TERMCAP_se=$'\e[0m' \ +LESS_TERMCAP_so=$'\e[1;44;33m' \ +LESS_TERMCAP_ue=$'\e[0m' \ +LESS_TERMCAP_us=$'\e[1;32m' \ +command man "$@"