Y
Hacker News
new
|
ask
|
show
|
jobs
by
stevenspasbo
3310 days ago
Both bash and zsh have the option histverify that will expand the !! like so:
> echo "Test"
> sudo !!<enter>
> sudo echo "Test"
You can then modify the command if you want to.