Live data from Hacker News

The Fuck – An app which corrects your previous console command

github.com

101–110 of 112 posts

Re: The Fuck – An app which corrects your previous console command

#101
post #95

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?

Well, yes it is, because again, I was just giving examples. Look at the list under "how it works" in the readme, and there's plenty of items there that aren't simple substitution. It'd be a lot easier to just 'fuck' for most of those than have to mentally parse what you need to do to 'fix it'.

Re: The Fuck – An app which corrects your previous console command

#102
post #54
post #40

Earlier 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.

You ... type "python"? Not pyt[tab]?

Re: The Fuck – An app which corrects your previous console command

#104

Earlier 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.

Why not introduce some sort of AI to it and get it to understand more what one wants to do?

Re: The Fuck – An app which corrects your previous console command

#107
An oldie that has been passed around in various incarnations since the 2000s is an alias also called fuck which repeats the last command with sudo. Either coincidence or perhaps it could be where the inspiration for this project came from.

    alias fuck='sudo $(history -p \!\!)'

Re: The Fuck – An app which corrects your previous console command

#109
post #94
post #43

Earlier 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 -

Even better: https://news.ycombinator.com/item?id=5666160
Post reply on HN