3 ms·
Most often case is when you forget to type sudo before command. This implementation propose to re-type executable name in all-caps (or type it in all-caps befor
by timeattack 7y ago
Most often case is when you forget to type sudo before command. This implementation propose to re-type executable name in all-caps (or type it in all-caps beforehand).
More efficient approach is to use keybinding like Ctrl+T to prepend sudo to the current command (or to the previous command if current is empty).
- faeyanpiraat 7y agoor use "sudo !!"
- al_form2000 7y agoAs mentioned above, you don't need to retype: $ foo bar baz<cr> ^P^A<esc>u $ FOO bar baz<cr> As for ^T, I'd wholly forgotten about bind, inputrc and all that- but of course both your proposal and the above can be put into an inputrc macro and bound to a key. However the all caps version is shorter when you remember you need sudo in the first place ;).