How to insert an entire command from history into the current command in Bash?
I've done some research and identified two GNU Readline key-bindings that would insert the first and last words of the previous command. Unfortunately, I don't know how to supply an argument n
to these key-binding (how-to?), and even if I knew, it would not be feasible for inserting long commands from history.
Ctrl-Alt-y
Insert the first argument to the previous command. With an argument n, insert the nth word from the previous command.
Alt-.
Alt-_
Insert the last argument to the previous command. With an argument n, insert the nth word from the previous command.
Does GNU Readline support inserting entire command from history into current command?
DISCLAIMER: I'm not looking for Bash command substitution.