News for hackers. Stuff that matters.
Re:The Fuck – An app which corrects your previous console co... by bogomipz on Monday April 17, 2017 @05:45PM (#14134694)
Is this any easier though than the using the carat style previous command substitution?

    ^bar^baz
Although I think the name might be more descriptive.
Re:The Fuck – An app which corrects your previous console co... by billyvg on Tuesday April 18, 2017 @02:26AM (#14136889)
It does more then substitution

  $ git pull
  There is no tracking information for the current branch.
  Please specify which branch you want to rebase against.
  See git-pull(1) for details.

    git pull <remote> <branch>

  If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> test

  $ fuck
  git branch --set-upstream-to=origin/test test && git pull [enter/↑/↓/ctrl+c]
Re:The Fuck – An app which corrects your previous console co... by dsl on Monday April 17, 2017 @06:45PM (#14135080)
I don't understand how you think anything is easier than typing 'fuck' and have it identify and correct your mistake for you?
Re:The Fuck – An app which corrects your previous console co... by bogomipz on Monday April 17, 2017 @07:26PM (#14135321)
Lets see in order to use "fuck" I need to first install it and its dependencies. The caret substitution natively exists in the Bash shell.

Also I know that no matter what system I am on be it OS X or Linux the caret syntax is guaranteed to work.

I don't understand how you think anything can be easier than using the functionality that has existed in the Bash shell shell(or even C shell variants)since forever.

Re:The Fuck – An app which corrects your previous console co... by Retra on Monday April 17, 2017 @07:57PM (#14135474)
If that were how things worked, we'd never use any new technology. Obviously it is easier to pay a one-time up-front cost than to slog away inefficiently forever.
Re:The Fuck – An app which corrects your previous console co... by bogomipz on Monday April 17, 2017 @08:31PM (#14135619)
>"If that were how things worked, we'd never use any new technology"

Nice try. That's a straw man. This isn't new technology. Its simply replicating existing functionality.

>"Obviously it is easier to pay a one-time up-front cost than to slog away inefficiently forever"

Whats the average typo 1 character as in most of the demos for "Fuck"? So I can either type 2 carets and 4 letters for a total of 6 characters or I can type the 4 characters in the word "fuck", how is the former inefficient? Wow, what a slog. I can't imagine what I will do with all the time I will have left over after installing this"

Re:The Fuck – An app which corrects your previous console co... by vacri on Monday April 17, 2017 @10:31PM (#14136068)
Speaking of straw men, this program does more than simple typo substitution. The listed examples include prepending sudo and using git-suggested commands.
Re:The Fuck – An app which corrects your previous console co... by bogomipz on Monday April 17, 2017 @11:33PM (#14136244)
>"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?

Re:The Fuck – An app which corrects your previous console co... by vacri on Tuesday April 18, 2017 @03:58AM (#14137138)
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 co... by somebehemoth on Monday April 17, 2017 @09:52PM (#14135935)
Yes for some use cases. On my keyboard setup it is significantly faster to type four common characters than to think about and type two ^ between substitutions.

^ substitution is more precise and I think it is an under appreciated tool, but I don't think that negates the usefulness of thefuck.