Re:Advancing in the Bash Shell
by brian_cloutier on Tuesday September 13, 2016 @04:17AM
(#12486393)
In addition to all the other methods which have been mentioned bash has a function called history-expand-line which will expand the history inline. That allows you to even keep editing it before you hit enter. By default it's bound to the terrible M-^ (Alt-^) which might explain why nobody knows about it.
history-expand-line is documented in: https://www.gnu.org/software/bash/manual/html_node/Miscellan...