Skip to content

Instantly share code, notes, and snippets.

@letam
Created December 14, 2021 17:46
Show Gist options
  • Save letam/05a31f90589b9cbab2d4c3c46b9352b4 to your computer and use it in GitHub Desktop.
Save letam/05a31f90589b9cbab2d4c3c46b9352b4 to your computer and use it in GitHub Desktop.
Install Git Plugin for Zsh
#!/usr/bin/env bash
# Install git.plugin.zsh from Oh My Zsh framework (https://github.com/ohmyzsh/ohmyzsh)
mkdir -p ~/.config/zsh
cd ~/.config/zsh
curl -O https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/git/git.plugin.zsh
if ! grep -q 'source ~/.config/zsh/git.plugin.zsh' ~/.zshrc; then
echo -e '\n# Load git plugin from Oh My Zsh framework (https://github.com/ohmyzsh/ohmyzsh)' >> ~/.zshrc
echo '[ -f ~/.config/zsh/git.plugin.zsh ] && source ~/.config/zsh/git.plugin.zsh' >> ~/.zshrc
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment