I often forget to run a command with sudo, so I find myself often typing
sudo !! immediately afterwards.
I tried aliasing this, but bash chokes on the
!! part. Is there some way to represent this shortcut within an alias?
AIUI the problem is that history substitutions (
From a colleague at work:
appears to do the trick