Live data from Hacker News

The Fuck – An app which corrects your previous console command

github.com

91–100 of 112 posts

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

#92

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.

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.

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

#93
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.

I type pythong all the time, too.

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

#94
post #43

Earlier quoted context omitted.

Amen. My bashrc has so many of these, and they're probably among the most common commands I use daily!: alias gs="git status" alias gb="git branch" alias grh="git reset --hard" alias gcdf="git clean -df" alias gf="git fetch" alias gp="git pull" alias gdom="git diff origin/master" alias gdomn="git diff --name-status origin/master" alias gd="git diff" alias gl="git log" alias glm="git log --author " alias gc="git check…

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

#95
post #78

Earlier quoted context omitted.

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 c…

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 command

#97
post #95

Earlier quoted context omitted.

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

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?

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

#99

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  

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

    git branch --set-upstream-to=origin/ 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 command

#100
post #72
post #51

Earlier quoted context omitted.

Add this to gitconfig file. It will automatically run the correct command after displaying what it is after a delay. The value is in 0.1s (centiseconds) of seconds. So 20 means 2 seconds. [help] autocorrect = 20 OR run git config --global help.autocorrect 20

Wouldn't those be deciseconds? Also wtf unit. Use Millis or seconds as a float. Yay Linus making sure that git only makes sense to wizards like him.

The Linux kernel seems to have a centisecond obsession too. Probably from way back when HZ was 100 and your computer woke up once every centiseecond to make sure it still had nothing to do.
Post reply on HN