TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Fuck – An app which corrects your previous console command

287 点作者 claroscuro大约 8 年前

22 条评论

Johnny555大约 8 年前
<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 未加载
madmax108大约 8 年前
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 未加载
evanb大约 8 年前
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 未加载
dang大约 8 年前
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 未加载
JoshCole大约 8 年前
If you mistype <i>fuck</i>, does it properly recurse up the <i>fuck</i> chain?
评论 #14134192 未加载
评论 #14134189 未加载
Symmetry大约 8 年前
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 未加载
ryandrake大约 8 年前
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 未加载
leesalminen大约 8 年前
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 未加载
beausy大约 8 年前
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>
varunagrawal大约 8 年前
Didn&#x27;t this appear on Hacker News years ago? I have been using it since and absolutely love it!
评论 #14138702 未加载
iagooar大约 8 年前
My favorite shell typo: dicker instead of docker. More funny if you speak German :)
评论 #14134127 未加载
whistlerbrk大约 8 年前
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 未加载
bogomipz大约 8 年前
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 未加载
excalibur大约 8 年前
This is wonderful.
m4tthumphrey大约 8 年前
Every day:<p>$ git pish<p>$ fuck
评论 #14133972 未加载
评论 #14134027 未加载
评论 #14134415 未加载
评论 #14133880 未加载
评论 #14134082 未加载
评论 #14133964 未加载
jianshen大约 8 年前
Now do ffmpeg! (Seriously I would pay for autocomplete ffmpeg cmd line options)
评论 #14135656 未加载
7ewis大约 8 年前
This seems fairly similar to the command auto-correction in Oh My Zsh.
评论 #14134871 未加载
cnp大约 8 年前
I use this app SO MUCH and recommend it to everyone. Great work!
formula_ninguna大约 8 年前
What if I misspell the word &quot;fuck&quot;?
axonic大约 8 年前
cursing is now provably productive
dingo_bat大约 8 年前
It&#x27;s a nice utility. But I stopped using it because it keeps messing up my bash history.
5_minutes大约 8 年前
+1 for not being PC
评论 #14134347 未加载
评论 #14133887 未加载
评论 #14133937 未加载