TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Fuck – An app which corrects your previous console command

287 pointsby claroscuroabout 8 years ago

22 comments

Johnny555about 8 years ago
<p><pre><code> [~user&#x2F;]$ rm -rf &#x2F; rm: it is dangerous to operate recursively on `&#x2F;&#x27; rm: use --no-preserve-root to override this failsafe [~user&#x2F;]$ fuck sudo rm -rf --no-preserve-root &#x2F; </code></pre> <i>fuck!</i>
评论 #14133973 未加载
评论 #14133997 未加载
madmax108about 8 years ago
I use this regularly, for everything ranging from the forgotten sudo (instead of running &quot;sudo !!&quot;) to typos across the board.<p>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 &quot;fuck&quot; to fix it, leading to so many stares :P<p>Just as an FYI, you can change the prompt from fuck to something else by changing your .bashrc eg.:<p><pre><code> eval &quot;$(thefuck-alias fixit)&quot; </code></pre> I&#x27;m not changing my alias though! ;)
评论 #14135480 未加载
evanbabout 8 years ago
I often set `alias fucking=&#x27;sudo&#x27;`.<p><pre><code> &gt;$ make me a sandwich permission denied &gt;$ fucking make me a sandwich [or] &gt;$ fucking !!</code></pre>
评论 #14134219 未加载
评论 #14137665 未加载
dangabout 8 years ago
Previously discussed at <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9396116" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9396116</a>.
评论 #14145578 未加载
JoshColeabout 8 years ago
If you mistype <i>fuck</i>, does it properly recurse up the <i>fuck</i> chain?
评论 #14134192 未加载
评论 #14134189 未加载
Symmetryabout 8 years ago
Another step towards the Anti-Mac user interface.<p><a href="https:&#x2F;&#x2F;www.nngroup.com&#x2F;articles&#x2F;anti-mac-interface&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nngroup.com&#x2F;articles&#x2F;anti-mac-interface&#x2F;</a>
评论 #14135444 未加载
评论 #14134300 未加载
ryandrakeabout 8 years ago
Would 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&#x27;t make it a bad feature.<p>git stauts<p>I mean, git knows enough to ask me &quot;Did you mean this? status&quot;.
评论 #14134646 未加载
评论 #14134962 未加载
评论 #14135028 未加载
leesalminenabout 8 years ago
This will definitely help some co workers who aren&#x27;t CLI-savvy and always tell me their commands &quot;didn&#x27;t work&quot;.
评论 #14134152 未加载
beausyabout 8 years ago
An 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.<p><pre><code> alias fuck=&#x27;sudo $(history -p \!\!)&#x27;</code></pre>
varunagrawalabout 8 years ago
Didn&#x27;t this appear on Hacker News years ago? I have been using it since and absolutely love it!
评论 #14138702 未加载
iagooarabout 8 years ago
My favorite shell typo: dicker instead of docker. More funny if you speak German :)
评论 #14134127 未加载
whistlerbrkabout 8 years ago
Love it, have thought about it, but my one concern always is that it&#x27;ll lead to a decrease in my typing skills instead of reinforcing good keying. But fuck, I just need to get stuff done sometimes.
评论 #14135060 未加载
bogomipzabout 8 years ago
Is this any easier though than the using the carat style previous command substitution?<p><pre><code> ^bar^baz </code></pre> Although I think the name might be more descriptive.
评论 #14136889 未加载
评论 #14135080 未加载
评论 #14135935 未加载
excaliburabout 8 years ago
This is wonderful.
m4tthumphreyabout 8 years ago
Every day:<p>$ git pish<p>$ fuck
评论 #14133972 未加载
评论 #14134027 未加载
评论 #14134415 未加载
评论 #14133880 未加载
评论 #14134082 未加载
评论 #14133964 未加载
jianshenabout 8 years ago
Now do ffmpeg! (Seriously I would pay for autocomplete ffmpeg cmd line options)
评论 #14135656 未加载
7ewisabout 8 years ago
This seems fairly similar to the command auto-correction in Oh My Zsh.
评论 #14134871 未加载
cnpabout 8 years ago
I use this app SO MUCH and recommend it to everyone. Great work!
formula_ningunaabout 8 years ago
What if I misspell the word &quot;fuck&quot;?
axonicabout 8 years ago
cursing is now provably productive
dingo_batabout 8 years ago
It&#x27;s a nice utility. But I stopped using it because it keeps messing up my bash history.
5_minutesabout 8 years ago
+1 for not being PC
评论 #14134347 未加载
评论 #14133887 未加载
评论 #14133937 未加载