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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to