What does HackerNews think of thefuck?

Magnificent app which corrects your previous console command.

Language: Python

#5 in Python
#4 in Shell
Depending on your temperament, you might prefer https://github.com/nvbn/thefuck

    $ apt-get install vim
    E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

    $ fuck
    sudo apt-get install vim
    [sudo] password for nvbn:
    Reading package lists... Done
Other customers also brew-installed: fuck [1]

[1]: https://github.com/nvbn/thefuck

Thefuck[0] will attempt to correct errors in your console commands (available via brew, apt, pip and others). You can even enable instant mode if you feel particularly frisky.

[0] https://github.com/nvbn/thefuck

This is awesome, can’t wait to try it out.

Does it handle questions that would result in piping commands together like “how do I get the third element in a JSON response from a curl command?”

This will be a great command alongside “fuck”


And here's a command that tries to fix up a mistake after you type it. Like this one, it's also named like what you might say afterwards.


The Fuck[1] is a handy tool that I use daily in the office.

Is fsck something you'd avoid because of its name, or is the single letter change enough to make it safe?

[1] https://github.com/nvbn/thefuck

TheFuck https://github.com/nvbn/thefuck

“Magnificent app which corrects your previous console command”

for the `mkae` you should really use `thefuck` cli anti-typo tool ;) https://github.com/nvbn/thefuck
I like that. I'll borrow it, but I'll rename it to 'damn', as 'fuck' it dedicated to https://github.com/nvbn/thefuck.
The Fuck — https://github.com/nvbn/thefuck

Magnificent app which corrects your previous console command

Kinda agree about it being annoying.

I think MFA is important and have it enabled for every service that offers it, but we have MFA set up for our CLI access to AWS and I used to let out a volume of curses frequently when my token expired.

I eventually ended up adding a bash alias “damn”[0] that pipes my current MFA token into the AWS CLI so whenever it expires I can just type “damn” and be logged back in.

I like the magic link approach Slack and Medium use - although I have frequently cursed the inconvenience of having to log into gmail.

[0] why damn? Fuck was taken: https://github.com/nvbn/thefuck

Can't speak to the microwave, but there are examples of this kind of UI such as https://github.com/nvbn/thefuck the trade off is the potential of ambiguity, see https://en.wikipedia.org/wiki/Time_flies_like_an_arrow;_frui...

Your microwave does sound badly designed though.

This is funny. I think I’ll stick with “thefuck” [1] though.

It would make a good prank to set up on someone that left their machine unlocked. Not sure if it’s more funny than changing their background to goatse.

[1] https://github.com/nvbn/thefuck

I've always found thefuck to be a great Python code base which is nicely organized and easy enough to wrap your head around. Also an easy project to contribute to.


I have homegrown aliases like 'tags' 'rdel' (git push origin --delete) 'ldel' (git branch --delete) and many more combined with Zsh's (Oh my Zsh)'s several aliases (e.g ggpull, glog, gp, gc) etc.

I also find "thefuck" is interesting but I love to control my fate :) (https://github.com/nvbn/thefuck)

For the latter, https://github.com/nvbn/thefuck is great and pretty satisfying to use.

(me earlier this month: https://twitter.com/sailoremo/status/908390247548911617)

I discovered https://github.com/nvbn/thefuck a while ago and now I kind of enjoy making typos like this.
It's a terrible idea, but an excellent example of experience:


[TL;DR -- typo a command, type 'fuck', will run the command you should have run]

thefuck - https://github.com/nvbn/thefuck

I just use it every day and I guess a lot of people too.

Hm. I wonder if the bash patching is actually necessary - a syntax failing command like '|foo' still goes into the history, so you could pick it up from there, maybe via a prompt command. https://github.com/nvbn/thefuck seems like kinda-sorta prior art for this.

(and if I'm wrong and/or the bash patch just makes things lots easier, then I'd love to see it posted somewhere people who know the bash source well can see if they can help turn it into a real feature, because custom error handlers seem as awesome as custom completion handlers)