-
-
Save anthonybishopric/4347253 to your computer and use it in GitHub Desktop.
cat with syntax highlighting
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
#! /usr/bin/env bash | |
# pip install -r Pygments | |
pygmentize -f terminal256 $1 2>/dev/null | |
if [ $? -ne 0 ] | |
then | |
cat $1 | |
fi | |
# you can also use this with less by doing | |
# pat the_file.py | less -R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment