]> code.delx.au - dotfiles/commitdiff
bash: colourful man pages
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 24 Dec 2013 05:18:29 +0000 (16:18 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Wed, 1 Jan 2014 10:35:57 +0000 (21:35 +1100)
.bash/interactive

index fddd7cf5bb56a03e8e48053b9c6cbb66d6cba2c4..13f8da19f18ccd1003cbe5d52b23588b0f205a03 100644 (file)
@@ -47,6 +47,16 @@ alias vv='vncviewer -encodings "tight hextile copyrect"'
 alias watch='watch -n1'
 
 
+# Colorful man pages
+function man {
+    env \
+               LESS_TERMCAP_md=$'\E[01;38;5;74m' \
+               LESS_TERMCAP_me=$'\E[0m' \
+               LESS_TERMCAP_us=$'\E[04;38;5;146m' \
+               LESS_TERMCAP_ue=$'\E[0m' \
+    man "$@"
+}
+
 # Sets colours to be appropriate for a light on dark terminal
 function darkterm {
        DARK=1