Apr 8, 2021
In bash, "history" shows the history of commands.
To select one, say at history number 23, type "!23".
For the last for a particular command "foo", type "!foo".
If you are editing, you can type ctl-Z to suspend the edit session, and start another edit session. If you ctl-Z out of that, you can "%-" to the first,