Syntax highlighting in less on osx | Putting the fun into Funkworks

To get lovely syntax highlighting in the OSX terminal (for seeing the output of ‘less’ nicely):

$ brew install source-highlight 

Add these your .profile or appropriate dotfile (.bash_profile, .zshrc)

LESSPIPE=`which src-hilite-lesspipe.sh`

export LESSOPEN="| ${LESSPIPE} %s"

export LESS='-R'

 

Source: Syntax highlighting in less on osx | Putting the fun into Funkworks

Commentate