Last active
January 19, 2022 10:57
-
-
Save IamDinni/64777de60b39042f38c6aadc752a9c57 to your computer and use it in GitHub Desktop.
Add Aliases to your '.zshrc' file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Running script... 🚀" | |
cat << EOF >> ~/.zshrc | |
# Yarn Aliases | |
alias y='yarn' | |
alias ys='yarn start' | |
alias yd='yarn dev' | |
alias ya='yarn add' | |
alias yt='yarn types' | |
alias yb='yarn build' | |
alias ytt='yarn test' | |
alias yp='yarn pretty' | |
alias ya='yarn all' | |
alias yw='yarn watch' | |
alias yad='yarn add -D' | |
alias yolo='rm -rf node_modules/ && rm yarn.lock && yarn install' | |
alias vim="/Users/dineshsingh/.local/bin/lvim" | |
alias v="vim" | |
# Terminal Aliases | |
alias ez='vim ~/.zshrc' | |
alias refresh='source ~/.zshrc' | |
alias coz='cat ~/.zshrc' | |
alias ea='vim ~/.config/Alacritty/alacritty.yml' | |
alias mex="cat ~/Library/Application\ Support/Mex/mex.json | jq '. | {contents, ilinks}' " | |
alias dm="rm -rf ~/Library/Application\ Support/Mex" | |
alias c="clear" | |
# Git Aliases | |
alias ga='git add .' | |
alias gs='git status' | |
alias gl='git log --graph --decorate --all' | |
alias glg='git log --oneline --decorate --graph --all' | |
alias gla='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --all' | |
alias glp='git log --color --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit' | |
alias gcb='git checkout -b' | |
alias gc='git checkout' | |
alias gb='git branch' | |
alias gbr='git branch --format="%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]" --sort=-committerdate' | |
alias gp='git push' | |
alias gps='git push --force-with-lease' | |
alias gpf='git push --force' | |
alias gpl='git pull --rebase' | |
alias gm='git commit -m' | |
alias gst='git stash' | |
alias gstd='git stash drop' | |
alias gf='git fetch' | |
alias gstp='git stash pop' | |
alias grc='git rebase --continue' | |
alias gpu='git push --set-upstream origin' | |
alias ggu='git config user.name' | |
alias gge='git config user.email' | |
alias gdm='git branch --merged | grep -v "*" | xargs -n 1 git branch -d' #Delete local merged branches | |
# Global Aliases | |
alias -g G="| grep" | |
alias -g L="| less" | |
# Local config | |
# Starship terminal | |
eval "$(starship init zsh)" | |
# nvm - Node version manager | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" # This loads nvm | |
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion | |
EOF | |
source ~/.zshrc | |
echo "Done 👍" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
✨ Features