Skip to content

Instantly share code, notes, and snippets.

@kinwahlai
Created September 25, 2014 05:55
Show Gist options
  • Save kinwahlai/8908e61a564088b63853 to your computer and use it in GitHub Desktop.
Save kinwahlai/8908e61a564088b63853 to your computer and use it in GitHub Desktop.
bash function to for highlighting code
function light() {
if [ -z "$2" ]
then src="pbpaste"
else
src="cat $2"
fi
$src | highlight -O rtf --syntax $1 --font Inconsolata --style solarized-dark --font-size 24 | pbcopy
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment