history expansion

Reuse and expand the shell history in sh, Bash, Zsh, rbash and ksh. More information: https://www.gnu.org/software/bash/manual/html_node/History-Interaction.

sudo !!

{{command}} !$

{{command}} !^

!{{n}}

!-{{n}}

!?{{string}}?

^{{string1}}^{{string2}}^

{{!-n}}:p