command line aliases to make repeated processes quicker. I’ve used them in the past and on specific programs but never on command line utilities.
like for instance with Debian, I’m repeatedly typing sudo apt-get install, so I aliased it: alias sagi=“sudo apt-get install” and it works pretty good.
Are there any best practices or aliases to avoid when using them? Other than known commands obviously. Are there popular alias lists out there?
Oh boy, my time to shine:
mkd
- Create directory and immediatelycd
into itdei
-docker exec -i
dps
-docker ps
mdocker
- Switch to minikube’s docker contextn
-nvim
n.
-nvim .
Node package managers
Exampes use
pnpm
but I have them foryarn
,npm
, andbun
toopi
-pnpm install
pd
-pnpm run dev
fzf stuff
sdh
- Search home directory (directories, recursive)Meme
fuckyou
-git push --force
nano
-nvim
Misc
createpgdb
- Create a postgres db on the given container with the given nameUsage:
createpgdb "postgres container" "db name"
I have similar ones for
dropdb
andpg_dump
. Here’s the command: