46 ms·
`sudo !!` is just very useful, just as most other things you can do with history substitution. Ctrl-R has its own usefulness but it only does a fraction of what
by DarkWiiPlayer 5y ago
`sudo !!` is just very useful, just as most other things you can do with history substitution. Ctrl-R has its own usefulness but it only does a fraction of what history substitution can do.
- abdusco 5y agoI like fish shell's approach: [Alt]+[E] prepends the command with `sudo`. So you hit arrow up to bring up the last command, then [Alt]+[E] to sudo-ify it.