11 ms·
The Fuck – An app which corrects your previous console command
- Symmetry 9y agoAnother step towards the Anti-Mac user interface. https://www.nngroup.com/articles/anti-mac-interface/ https://www.nngroup.com/articles/anti-mac-interface/
- _xgw 9y agoWhat would be the Mac design principle way of doing this then? Would every command line tool then be an Anti-Mac user interface?
- bramen 9y ago"Anti-Mac interface" doesn't seem to be pejorative in this context.
- Symmetry 9y agoMore or less helping move from 'direct manipulation' to delegation. It's not so much that this is moving away from any particular Mac principle so much as towards the sort of system outlined in that essay.
- marcosdumay 9y agoIt's an interesting proposition. A highly abstracted, very high level, very modal multi-user system where users actually interact instead of being sandboxed. Keep in mind that "anti-X" stuff tends to resemble the original "X", thus despite the antagonistic name, this is probably not as revolutionary as we will get.
- excalibur 9y agoThis is wonderful.
- leesalminen 9y agoThis will definitely help some co workers who aren't CLI-savvy and always tell me their commands "didn't work".
- styfle 9y agoYou have the problem too? Everyone comes to me when the get a conflict because they don't read the part that says when you're done, do `git rebase --continue`
- deleted 9y ago[deleted]
- 5_minutes 9y ago+1 for not being PC
- m4tthumphrey 9y agoEvery day: $ git pish $ fuck
- bcherny 9y agoFor me it tends to be $ git poop
- zacharyvoase 9y agoas opposed to `git log`?
- bcherny 9y agoIn case that wasn't a joke - no, `git pop`.
- anodin3 9y agoFor me it usually is "git remove" instead of "git remote".
- savanaly 9y agoFor those who don't know, you can make git pish have the same effect as git push by creating an alias between pish and push. Useful to do for any misspellings you make more than once. $ git config --global alias.pish push
- headmelted 9y agoCannot for the life of me tell if this is a serious suggestion.
- deleted 9y ago[deleted]
- Johnny555 9y ago[~user/]$ rm -rf / rm: it is dangerous to operate recursively on `/' rm: use --no-preserve-root to override this failsafe [~user/]$ fuck sudo rm -rf --no-preserve-root / fuck!
- adamson 9y agoThat was my first thought, although it looks like they were responsible enough to make you hit return to confirm that you want to run the command
- nvbn 9y agoRule for this behavior disabled by default, but you can enable it. Also you can disable confirmation or use `fuck -y` for more fun.
- hinkley 9y agoI feel like they missed an opportunity to use 'fuck yeah' as the automatic override.
- derefr 9y agoalias just=sudo just fuck -me -up
- pharrington 9y agoThis is Art. Thank you for doing Art on HN.
- nickpsecurity 9y agoI 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 is like the Underwear Gnomes model for problem-solving applied to terminals. They always missing step 2. Except, on step 2, you just "fuck" to get profit... err, you get to finish at Step 2 with one word. Finish faster with this technique to move on to next job in workflow.
- iagooar 9y agoMy favorite shell typo: dicker instead of docker. More funny if you speak German :)
- floatboth 9y agoReminds me of http://anafenza.tumblr.com/post/154944486277/humming-bird-moth-discoursestorm http://anafenza.tumblr.com/post/154944486277/humming-bird-mo...
- madmax108 9y agoI use this regularly, for everything ranging from the forgotten sudo (instead of running "sudo !!") to typos across the board. But it does get me into interesting situations! Just the other day I was demo-ing something to my team + Director of Engg on the projector, and I ran an incorrect command, followed by "fuck" to fix it, leading to so many stares :P Just as an FYI, you can change the prompt from fuck to something else by changing your .bashrc eg.: eval "$(thefuck-alias fixit)" I'm not changing my alias though! ;)
- freecodyx 9y agofunny!, next time i am demoing, i will try to do it, to show off obviously
- JoshCole 9y agoIf you mistype fuck, does it properly recurse up the fuck chain?
- deleted 9y ago[deleted]
- zuck9 9y ago> fsck ERROR: volume / is mounted with write access. Re-run with (-l) to freeze volume. > fuck No fucks given
- evanb 9y agoI often set `alias fucking='sudo'`. >$ make me a sandwich permission denied >$ fucking make me a sandwich [or] >$ fucking !!
- joshmanders 9y agoI have the same. # Because sometimes you gotta be harsh. alias fucking="sudo" # And sometimes you gotta be nice. alias please="sudo"
- skocznymroczny 9y agoWorks with my wife.
- dang 9y agoPreviously discussed at https://news.ycombinator.com/item?id=9396116 https://news.ycombinator.com/item?id=9396116.
- i336_ 9y agoI see why you linked that. My brain nearly double faulted from learning new things too fast. Great thread.
- the_denial 9y agoHi. Thanks for catching the JS injection and shock site redirect bug. I fixed it.
- i336_ 9y agoAh, good to hear. Sorry it happened. Since https://news.ycombinator.com/item?id=14144814 https://news.ycombinator.com/item?id=14144814 got locked (which, to provide context for anyone else reading, is why this reply is here in this thread) maybe you could repost it now. FWIW, this idea in and of itself is worth spending a bit of time on. The page itself is very... basic right now, and I wouldn't discount that this may be one major reason why nobody is taking the concept seriously. Which makes sense: nobody knows what your areas of specialty and experience are, what you're capable of, and all they've got is this very barebones page. Noone knows what to suggest for you to do!! Spending some time on the page design and specifying the kinds of things you're capable of - and, most importantly, the things you're most interested in - might just turn things around a fair bit. Thanks for the ping :) and hopefully you see this. I note you have not yet put any contact info on that page :P (Gmail happily forwards, and Outlook (which forwards too) also has aliases) My email is in my profile FWIW. You could also drop your username on the page and tell people to "find your email on HN". That could be a good filter.
- whistlerbrk 9y agoLove it, have thought about it, but my one concern always is that it'll lead to a decrease in my typing skills instead of reinforcing good keying. But fuck, I just need to get stuff done sometimes.
- eric_h 9y agoPersonally my typo rate has held pretty steady over the last decade, I don't think something like this would have any measurable effect on how well one types. My concern would be that the extra keystroke to confirm would ingrain the skip confirm (fuck -y, or even just hitting enter before I'm prompted again) into my muscle memory, with potentially disastrous consequences (hence I've never installed this tool).
- ryandrake 9y agoWould be nice to have some form of autocorrect directly in the shell, especially if it was aware of common programs and so could also autocorrect options. Obviously we could think of a few cases with destructive outcomes--but that doesn't make it a bad feature. git stauts I mean, git knows enough to ask me "Did you mean this? status".
- hashhar 9y agoAdd 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
- ryandrake 9y agoWow, great tip, thanks. One command down, hundreds to go.
- hashhar 9y agoI once set up a schedule where I would open the gitconfig manpage and read at least one section of the settings. My gitconfig file growed to over 200 lines then. Quite a lot of stuff isn't very helpful in there though.
- Pxtl 9y agoWouldn'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.
- hashhar 9y agoI don't know. I'm confused as is. I really hate when people break: 1. Conventional units. 2. Don't follow the XDG basedir spec for config files. 3. Make inconsistent command line flags. 4. Don't allow control of color output using a flag thinking they are smarter than me.
- bogomipz 9y agoIs this any easier though than the using the carat style previous command substitution? ^bar^baz Although I think the name might be more descriptive.
- dsl 9y agoI don't understand how you think anything is easier than typing 'fuck' and have it identify and correct your mistake for you?
- bogomipz 9y agoLets 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.
- Retra 9y agoIf 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.
- bogomipz 9y ago>"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"
- 7ewis 9y agoThis seems fairly similar to the command auto-correction in Oh My Zsh.
- cnp 9y agoI use this app SO MUCH and recommend it to everyone. Great work!
- jianshen 9y agoNow do ffmpeg! (Seriously I would pay for autocomplete ffmpeg cmd line options)
- nvbn 9y agoIt can't help with autocomplete, but I guses it would be easy to create a rule for fixing incorrect ffmpeg calls. Create an issue about that in https://github.com/nvbn/thefuck/issues https://github.com/nvbn/thefuck/issues
- varunagrawal 9y agoDidn't this appear on Hacker News years ago? I have been using it since and absolutely love it!
- ChrisArchitect 9y agowow yeah, this is what, 2+ years old?
- dingo_bat 9y agoIt's a nice utility. But I stopped using it because it keeps messing up my bash history.
- formula_ninguna 9y agoWhat if I misspell the word "fuck"?
- la6470 9y agoDo we have to use the word fuck? Can't the author be a little tolerant of other views and use the word duck instead?
- axonic 9y agocursing is now provably productive
- beausy 9y agoAn 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 \!\!)'