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?
|
I often forget to run a command with sudo, so I find myself often typing I tried aliasing this, but bash chokes on the | ||||
|
feedback
|
|
AIUI the problem is that history substitutions (
| |||||||||
feedback
|
|
From a colleague at work:
appears to do the trick | |||||||
feedback
|
!!are considered literal. – Dennis Williamson Feb 1 '11 at 1:54