DEV Community

loading...

What bash aliases does everyone use on a daily basis? 🔥

coderarchive profile image Lu-Vuong Le 🎧💻 ・1 min read

Bash aliases are incredibly useful to reduce the amount of typing and memorisation of long or repetitive commands.

Some that I have set are:

ga=git add -A
gc=git commit -m $*
gp=git push origin $*
gs=git status

I've also come across a good list here:

https://github.com/algotech/dotaliases

That being said, I'm also curious about what aliases does everyone use often, are their favourites or find intuitive for them? 😄

Discussion (2)

pic
Editor guide
Collapse
thomaslombart profile image
Thomas Lombart

I love aliases, you gain so much time. Here's what it looks like for me (as of now, it'll certainly grow):

# use hub for git
alias git=hub

## npm aliases
alias ni="npm install"
alias nrs="npm run start -s --"
alias nrb="npm run build -s --"
alias nrd="npm run dev -s --"
alias nrt="npm run test -s --"

## yarn aliases
alias ya="yarn"
alias yaa="yarn add"
alias yar="yarn remove"
alias yad="yarn run dev"
alias yas="yarn run start"
alias yab="yarn run build"
alias yat="yarn run test"
alias yaga="yarn global add"
alias yagr="yarn global remove"
alias yarn-update="yarn upgrade-interactive --latest"

alias flush="rm -rf node_modules"
alias cleanup_ds="find . -type f -name '*.DS_Store' -ls -delete"

# custom aliases
alias de="cd ~/Desktop"
alias dl="cd ~/Downloads"

# Update brew
alias brew-update='brew update; brew upgrade; brew cleanup';

# Copy the ZSH config to dotfiles repo
alias copy-zsh='cp ~/.zshrc ~/Desktop/dotfiles/.zshrc; cd ~/Desktop/dotfiles && git add .zshrc && git commit -m "Update ZSH" && git push'
Collapse
coderarchive profile image
Lu-Vuong Le 🎧💻 Author

Awesome! Loving the list so far :)