In bash I can use !!
to indicate the last command. In ksh I think you can use r
to do something similar, but it seems to fail in one of my common patterns: typing sudo [last command]
.
> cp foo /bar
cp: permission denied
> r c # If I do this it will repeat my cp call
> sudo r c # when I do this, it tells me that "r" is not a command
How can I use history to quickly type "sudo [last command]"?