Show HN: ALL_CAPS => sudo all_caps (Bash)
11–20 of 26 posts
Re: Show HN: ALL_CAPS => sudo all_caps (Bash)
#12Re: Show HN: ALL_CAPS => sudo all_caps (Bash)
#13up 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.
$ foo bar baz
^P^Au
$ FOO bar baz
That's three keystrokes less - even for the history (!!) version. :-)Re: Show HN: ALL_CAPS => sudo all_caps (Bash)
#14Most 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).
$ foo bar baz
^P^Au
$ FOO bar baz
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)
#15Did some kind of automoderation break the title by changing ALL_CAPS to All_caps?
ALL_CAPS => sudo all_caps
So it appears something did actually change it.Re: Show HN: ALL_CAPS => sudo all_caps (Bash)
#16Did some kind of automoderation break the title by changing ALL_CAPS to All_caps?
I remember writing the title as ALL_CAPS => sudo all_caps So it appears something did actually change it.
Unfortunately many blogs have their titles all uppercase instead of using small caps. For me the use case where I copy an all uppercase title and want it to be titlecased on HN is much more common than the case where I actually want a string of caps. I'm quite ok with the current behavior.
Re: Show HN: ALL_CAPS => sudo all_caps (Bash)
#17Isn't typing 'sudo yum' faster than 'YUM'?
I can't deny that something feels terribly wrong about this sort of script, though.
Re: Show HN: ALL_CAPS => sudo all_caps (Bash)
#18Isn't typing 'sudo yum' faster than 'YUM'?
…is that a sarcastic question? How would typing 'YUM' NOT be faster than 'sudo yum'? I can't deny that something feels terribly wrong about this sort of script, though.
Re: Show HN: ALL_CAPS => sudo all_caps (Bash)
#19Earlier quoted context omitted.
…is that a sarcastic question? How would typing 'YUM' NOT be faster than 'sudo yum'? I can't deny that something feels terribly wrong about this sort of script, though.
because you need press shift while pressing y, u, m to type YUM. I definitely type sudo yum faster.