Created
November 27, 2011 16:52
-
-
Save ViktorStiskala/1397807 to your computer and use it in GitHub Desktop.
Display highlighted C include file
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
#!/bin/bash | |
if [ -z $1 ] | |
then | |
echo "Usage: include filename" 1>&2 | |
exit 1 | |
fi | |
filename="/usr/include/$1" | |
if [ ! -f $filename ]; then | |
echo "File not found" 1>&2 | |
exit 1 | |
fi | |
pygmentize -l c -P style=default -f terminal256 "$filename" | less -R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment