Bash tips & tricks
dirs shows the stack of directories. dirs -v shows them vertically with their indexes. Recommend aliasing dirs to dirs -v.
pwd is always transient at the top of the stack.
Reference directories with ~[index] where [index] is the directory stack index.
history shows commands for user.
Reference command with ![command] where [command] is the index from history or the most recent command beginning with [command].
PROTIP: Append
:pto print instead of exec.
!! is the last command ran. sudo !! is amazing.
Reference command args with ![command]:[index] where index is the arg index.
Can also use ^ for first, $ for last, and * for all.