Last Updated: July 19, 2020
·
4.824K
· Osvaldo Zonetti

'cat' with syntax highlighting

Install pygmentize with easy_install or pip:

sudo apt-get install python-setuptools
sudo easy_install pygments

Then:

alias ccat='pygmentize -O style=monokai -f console256 -g'

1 Response
Add your response

thanks for this!
In order for it to work in bash on Windows I had change it a bit like this.
I changed the alias so I still have the og cat command.

alias ccat='pygmentize -O style=monokai -f terminal -g'

thanks bro.

over 1 year ago ·