packages: lesspipe/lesspipe.sh - use colorful styles only on capable termin...
gotar
gotar at pld-linux.org
Thu May 28 11:23:52 CEST 2009
Author: gotar Date: Thu May 28 09:23:52 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- use colorful styles only on capable terminals (TODO: add more of them)
---- Files affected:
packages/lesspipe:
lesspipe.sh (1.37 -> 1.38)
---- Diffs:
================================================================
Index: packages/lesspipe/lesspipe.sh
diff -u packages/lesspipe/lesspipe.sh:1.37 packages/lesspipe/lesspipe.sh:1.38
--- packages/lesspipe/lesspipe.sh:1.37 Thu May 28 02:13:14 2009
+++ packages/lesspipe/lesspipe.sh Thu May 28 11:23:47 2009
@@ -78,7 +78,11 @@
groff -s -p -t -e -Tlatin1 -mandoc "$1"
fi
;;
- *) run-mailcap "$1" || highlight --xterm256 --style=darkblue "$1"
+ *) case $TERM in
+ xterm|xterm-color) output=xterm256;;
+ *) output=ansi;;
+ esac
+ run-mailcap "$1" || highlight --$output --style=darkblue "$1"
# Check to see if binary, if so -- view with 'strings'
# FILE=$(file -L "$1")
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/lesspipe/lesspipe.sh?r1=1.37&r2=1.38&f=u
More information about the pld-cvs-commit
mailing list