Created
September 25, 2014 05:55
-
-
Save kinwahlai/8908e61a564088b63853 to your computer and use it in GitHub Desktop.
bash function to for highlighting code
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
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