man bash, and search for "^HISTORY EXPANSION" for all the details.
I often find myself running commands like
cp !:2 !:1 # reverses the order of the last two args
cd /somedir && !! # run the last command in a better directory
man bash, and search for "^HISTORY EXPANSION" for all the details.
I often find myself running commands like
cp !:2 !:1 # reverses the order of the last two args
cd /somedir && !! # run the last command in a better directory