A Quick Note

If you would like to use the current history event number in your
prompt without needing a % escape sequence, make sure to turn on the
PROMPT_BANG shell option. This allows you to use
! (bang) in your prompt strings for the current history
event number. If you would like an actual ! to be
displayed in your prompt, use !! in your prompt string.