Sunday, April 02, 2006

What would be handy...

What would be handy is a simple hotkey for the command line so that when you type in...

somecommandthatneedsroot

and it comes back permission denied, you hit it and it recalls the line with "sudo " in front...

sudo somecommandthatneedsroot

(Another suggestion here is that you could just catch the permission denied and change it to "permission denied... sudo it y/n?" but that'd a lot harder to implement and probably bugger up all sorts of scripts)

2 comments:

Sam Livingston-Gray said...

Ctrl+P, Ctrl+A, "sudo ", enter.

Not quite a one-keyer, but one could probably work out a clever solution involving Quicksilver (or its equivalent).

Unknown said...

Well, yes, but using Quicksilver would mean it wouldn't work on an ssh session or similar.