DEV Community

Lu-Vuong Le πŸš€
Lu-Vuong Le πŸš€

Posted on

What bash aliases does everyone use on a daily basis? πŸ”₯

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
Enter fullscreen mode Exit fullscreen mode

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? πŸ˜„

Top comments (2)

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 πŸš€

Awesome! Loving the list so far :)