Month: November 2019

How to Use zsh Alias

It’s very convenient to use an alias instead of full command. So, let’s see how we can make some aliases for git command –

To make an alias, open the terminal and write the command below –

vi ~/.zshrc

Write some aliases –

alias gs=”git status”
alias ga=”git add”
alias gm=”git commit -m”
alias bci=”brew cask install”

Colse and save the vim with clicking esc button and :wq

To make your created aliases work, run the command below –

source ~/.zshrc

Done. Now you can use the aliases you made as many times as you want.

Happy coding!