Hacker News new | ask | show | jobs
by some_guy_nobel 232 days ago
These are great, and I have a few matching myself.

Here are some super simple ones I didn't see that I use almost every day:

cl="clear"

g="git"

h="history"

ll="ls -al"

path='echo -e ${PATH//:/\\n}'

lv="live-server"

And for common navigation:

dl="cd ~/Downloads"

dt="cd ~/Desktop"

2 comments

I'm terrible about remembering shortcuts (edit a bash line in an editor? Can never remember it) but clear (CTRL-l) is one that really stuck.

That and exit (CTRL-d). A guy I used to work with just mentioned it casually and someone it just seared itself into my brain.

FYI, ctrl-d isn't a shortcut to exit terminal. It sends EOF (end of file) character which, when reaches shell, closes stdinput file of shell. It generally closes any active interactive input, like all repls, interactive input to sed etc. When interactive shell loses possibility to get more input, it closes as soon as possible and then its parent, the terminal window, also closes. More-less :)
Never new ctrl+l, that's great, thanks!
k=kubectl