Earlier quoted context omitted.
Speaking of straw men, this program does more than simple typo substitution. The listed examples include prepending sudo and using git-suggested commands.
>"The listed examples include prepending sudo" Which you can get by typing: sudo !! and git completion is in contrib: https://github.com/git/git/tree/master/contrib/completion Not really a strawman is it?
The Fuck – An app which corrects your previous console command
101–110 of 112 posts
Re: The Fuck – An app which corrects your previous console command
#102Earlier quoted context omitted.
I've actually done this for a couple commands I screw up often enough -- I have this in my bashrc: alias dumbtypo="echo 'LEARN TO TYPE, MORON'" alias sl="dumbtypo; ls" alias rbuy="dumbtypo; ruby" alias pytohn="dumbtypo; python" alias brwe="dumbtypo; brew" alias arhcey="dumbtypo; archey"
I'm incredulous that 'pythong' is not in there. I can't not-type it.
Re: The Fuck – An app which corrects your previous console command
#103Re: The Fuck – An app which corrects your previous console command
#104Earlier quoted context omitted.
I like how you named and styled the command after how many terminal users actually approach these situations. 1. Hurriedly type something to solve a pressing problem. It doesn't work but tells you enough the fix should be obvious to a machine. 2. Mutter or shout "Fuck!" in head depending on how obvious problem was, how often it repeats, or just how long it takes to redo it. 3. Perform the correct action. Your model i…
Of course, the drawback is that the machine doesn't really know what you intended without more context than a single command line. Often it can make a good guess, but not always and sometimes it'll guess wrong, perhaps disastrously so.
Re: The Fuck – An app which corrects your previous console command
#105I often set `alias fucking='sudo'`. >$ make me a sandwich permission denied >$ fucking make me a sandwich [or] >$ fucking !!
Re: The Fuck – An app which corrects your previous console command
#106Re: The Fuck – An app which corrects your previous console command
#107 alias fuck='sudo $(history -p \!\!)'Re: The Fuck – An app which corrects your previous console command
#108Didn't this appear on Hacker News years ago? I have been using it since and absolutely love it!
Re: The Fuck – An app which corrects your previous console command
#109Earlier quoted context omitted.
Or how about git commit with a dummy message? :)
Like this? $ cat ~/.commit_reasons; strfile ~/.commit_reasons Testing... % Testify... % Testarossa... % Does it work yet? % How bout now? % Oops. % Fixed a thing. % EOF $ fortune ~/.commit_reasons | cowsay | git -F -
Re: The Fuck – An app which corrects your previous console command
#110Previously discussed at https://news.ycombinator.com/item?id=9396116 .
My brain nearly double faulted from learning new things too fast. Great thread.