Skip to content

Instantly share code, notes, and snippets.

@dbonates
Last active December 17, 2022 04:05
Show Gist options
  • Save dbonates/d597e6996175b6986a9e0868f1c0bb39 to your computer and use it in GitHub Desktop.
Save dbonates/d597e6996175b6986a9e0868f1c0bb39 to your computer and use it in GitHub Desktop.
pcat install, because cat should be pretty! 🐱
################
### macOS ###
################
brew install python3
brew install python
brew unlink python && brew link --overwrite python # make sure python links to python2
pip2 install --upgrade pip setuptools # upgrade to latest pip2
pip3 install --upgrade pip setuptools # upgrade to latest pip3
# never use the generic “python” and “pip”.
# always use “python[2/3]” and “pip[2/3]”.
pip3 install pygments
# to upgrade later:
# pip3 install pygments --upgrade
alias pcat='pygmentize -f terminal256 -O style=native -g'
# or for use with monokai
# alias pcat='pygmentize -f terminal256 -O style=monokai -g'
##########################
### linux with zsh ###
##########################
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py --user
curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python3
sudo python3 get-pip.py
sudo pip3 install pygments
echo "alias pcat='pygmentize -f terminal256 -O style=native -g'" >> ~/.zshrc
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment