Re:Show HN: ALL_CAPS => sudo all_caps (Bash)
by al_form2000 on Monday October 21, 2019 @12:41PM
(#21314311)
As 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 ;).
Re:Show HN: ALL_CAPS => sudo all_caps (Bash)
by faeyanpiraat on Monday October 21, 2019 @10:32AM
(#21312691)
or use "sudo !!"
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).