Shells like zsh and bash have bang commands which start with an exclamation mark and expand to items in the user's history.

To get the last argument of the the last command that was run, one can use !$ , e.g.

$ echo one two three $ echo !$ !$ !$ > three three three

In zsh, it is possible to expand these bang commands interactively:

touch foo bar ls !$<TAB>

!$ will be expanded to foo inline.

This is very useful because it often prevented me from mistakes: I press tab to expand and make sure I got it right and C-/ to undo the expansion when I'm confident.

Is there a setting in bash to achieve interactive expansion of bang commands?