Skip to content

Instantly share code, notes, and snippets.

@BretFisher
Last active October 22, 2025 09:55
Show Gist options
  • Select an option

  • Save BretFisher/6f688dde0122399efdca5a9d26100437 to your computer and use it in GitHub Desktop.

Select an option

Save BretFisher/6f688dde0122399efdca5a9d26100437 to your computer and use it in GitHub Desktop.
On macOS: Install pygmentize and alias pcat for shell code syntax highlighting
# first install pygmentize to the mac OS X or macOS system with the built-in python
sudo easy_install Pygments
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc.
alias pcat='pygmentize -f terminal256 -O style=native -g'

ghost commented Oct 26, 2017

Copy link
Copy Markdown

As for why I changed the style choice from native to monokai? Well... here's why. Monokai extends the syntactic highlighting to make things even clearer than the native theme.

native:

native

native2

monokai:

monokai

monokai2

@varun-c-amagi

Copy link
Copy Markdown

I randomly came across this gist. But man, this is just fantastic!!!!!!!!!
Thanks a lot for the idea and alias.

@DhavalDalal

Copy link
Copy Markdown

Thanks indeed...this is great!!

@ianizaguirre

Copy link
Copy Markdown

This is awesome! Thank you

@binakot

binakot commented Sep 1, 2018

Copy link
Copy Markdown

Found this one while learning your course about Docker!
Thanks for the course and this gist too!

@thiagogenez

Copy link
Copy Markdown

Found this one while learning your course about Docker too! -- Thank you, much appreciated!

@elchyan-picsart

Copy link
Copy Markdown

Yeah me too Docker course :))

@LordAmit

Copy link
Copy Markdown

Was looking for something like this. Thanks!

@mcouthon

Copy link
Copy Markdown

Delicious.

@HamidOsouli-zz

Copy link
Copy Markdown

Thanks, It's great :)

@BretFisher

Copy link
Copy Markdown
Author

I've stopped using pcat years ago, and now use bat: https://github.com/sharkdp/bat

@touseefmurtaza93

Copy link
Copy Markdown

I was about to install the Pygments but now going to give a shot to bat

@CuongNgMan

Copy link
Copy Markdown

I've stopped using pcat years ago, and now use bat: https://github.com/sharkdp/bat

Greate advice. Thanks.

@slevinas

Copy link
Copy Markdown

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment