What are your most liked alias for long commands or just to give them better names.
Mine are:
alias load="source .load.sh"
alias eload="$EDITOR .load.sh"
alias gpush="git push"
alias gadd="git add --all"
alias gcommit="git commit -m "
alias gst="git status -s"
alias gpull="git pull"
I like to use the ones includes in oh-my-zsh. It’s a big list, but the ones I use the most are:
gst --> git status
gcam --> git commit -am
gcp --> git cherry-pick
gsta --> git stash save
gstp --> git stash pop
gpsup --> git push --set-upstream origin $(git_current_branch)
grb --> git rebase
alias fuck='sudo $(fc -ln -1)'
yeah, I could do that. Kinda prefer to use my alias anyway as the expletive is almost always the first word that comes to mind when I forget to sudo something
Can’t argue with that but it reminds me of thefuck which is similar but does more
I always set these because I’ve been burned too many times:
Turn on interactive mode for dangerous commands
alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -iv'
For git and working with a mix of master and main default branch repos my favourite is
gsm='git switch $(git_main_branch)'
to switch back to main/master
Technically not aliases but I have these in my ~/.bash_aliases so…
bind ‘“\e[A”: history-search-backward’
bind ‘“\e[B”: history-search-forward’
Type a few letters and press up/down arrow to scroll through matching history entries.
Also…
alias s=“cd -”
It’s like Alt+Tab for CLI.