Shamelessly copied from this tiny twitter thread by Kristian Köhntopp
Search history for the last command starting with keks
Search history for the last command containing keks
Repeat the previous command, after replacing keks with cookie
Repeat the previous command
Repeat the previous command, after substitution of image with headers
Repeat the previous command, after substitution of image with headers on the whole command line
$ sudo !!
Repeat the previous command but prefix it with sudo (so much yelling!)
$ shopt -s histverify
Show result of above history expansion before exec.
rm -rf keks
Starting a command with a space will prevent it from entering the history.
$ unset HISTFILE
unsetting HISTFILE or HISTFILESIZE will prevent the shell from logging commands
And of course, as mentioned later in that discussion: