Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save saltnpixels/c89edbfc68a9d9d8bf30200f02c1cb58 to your computer and use it in GitHub Desktop.
Save saltnpixels/c89edbfc68a9d9d8bf30200f02c1cb58 to your computer and use it in GitHub Desktop.
iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup
# .zshrc
ZSH_THEME=""

npm install --global pure-prompt

# oh-my-zsh overrides the prompt, so Pure must be activated after `source $ZSH/oh-my-zsh.sh`
# .zshrc
autoload -U promptinit; promptinit
prompt pure
# .zshrc
# include Z, yo
. ~/z.sh
  • Install zsh-syntax-highlighting oh-my-zsh plugin
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • Install zsh-autosuggestions oh-my-zsh plugin
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
  • Install pygments package, a pre-requisite for colorize plugin(cat with syntax highlight support, alias ccat)
pip install pygments

# OR
pip3.6 install pygments
  • Install trash command as safter alternative for rm command
npm install --global trash-cli

trash ./folder/file.txt # Should move to trash instead of permanently deleting it
  • Finally update plugins list for oh-my-zsh in ~/.zshrc
# .zshrc
plugins=(
  git
  brew
  common-aliases
  node
  npm
  rand-quote
  sudo
  yarn
  z
  colored-man-pages
  colorize
  cp
  zsh-syntax-highlighting
  zsh-autosuggestions
)

Screenshot

Screenshot 2021-03-01 at 5 36 16 PM

Bonus

Try https://starship.rs/ or https://github.com/denysdovhan/spaceship-prompt

Useful links:

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