I run a command, then realize it should have been run with sudo
.
In zsh I have a function so that I can hit a ^x^x and it will grab the previous line from the history and prepend sudo
to it, so I can run it again.
Is it possible to do this with bash?