brew install zsh pure fzf
# install "Oh My ZSH!"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
git clone [email protected]/zdharma-continuum:fast-syntax-highlighting.git \
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
git clone [email protected]:olets/zsh-abbr.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-abbr
git clone [email protected]:zsh-users/zsh-autosuggestions \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Edit the .zshrc
theme as folloing:
ZSH_THEME=""
autoload -U promptinit; promptinit
prompt pure
Edit the plugins section of .zshrc
as follows:
plugins=(zsh-autosuggestions fzf ssh-agent zsh-abbr nvm docker z fast-syntax-highlighting)
Add the following abbreviations:
abbr e=code
abbr gb='git branch --sort=-committerdate'
abbr gc='git checkout'
abbr gd='git diff --color-words'
abbr ggl='git pull origin $(git_current_branch)'
abbr ggp='git push origin $(gitcurrent_branch)'
abbr glog='git log --decorate --graph --oneline'
abbr gs='git status'
abbr j=z