Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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]


I don't understand how you think anything is easier than typing 'fuck' and have it identify and correct your mistake for you?


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.


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.


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


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


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: