Last active
January 26, 2016 20:19
-
-
Save lo5an/159473922d0000f50eb0 to your computer and use it in GitHub Desktop.
bashrc snippet to colorize less.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use pygments to colorize less output | |
# http://pygments.org/docs/cmdline/ | |
# requires pygments, obviously | |
PYGMENTS_FILTER="pygmentize" | |
if which $PYGMENTS_FILTER > /dev/null ; then | |
LESSPIPE="`which $PYGMENTS_FILTER` -f terminal" | |
export LESSOPEN="| ${LESSPIPE} %s" | |
export LESS='-R' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment