Skip to content

Instantly share code, notes, and snippets.

@lo5an
Last active January 26, 2016 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lo5an/159473922d0000f50eb0 to your computer and use it in GitHub Desktop.
Save lo5an/159473922d0000f50eb0 to your computer and use it in GitHub Desktop.
bashrc snippet to colorize less.
# 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