up arrow
ctrl-a (readline command for beginning of line)
type "sudo"
Also, ctrl-w is really useful. Heck, learning the readline editing keyboard in general is really useful.
ctrl-a (readline command for beginning of line)
type "sudo"
Also, ctrl-w is really useful. Heck, learning the readline editing keyboard in general is really useful.
$ foo bar baz<cr>
^P^A<esc>u
$ FOO bar baz<cr>
That's three keystrokes less - even for the history (!!) version. :-)