<p><pre><code> [~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 /
</code></pre>
<i>fuck!</i>
I use this regularly, for everything ranging from the forgotten sudo (instead of running "sudo !!") 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 "fuck" 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 "$(thefuck-alias fixit)"
</code></pre>
I'm not changing my alias though! ;)
I often set `alias fucking='sudo'`.<p><pre><code> >$ make me a sandwich
permission denied
>$ fucking make me a sandwich
[or]
>$ fucking !!</code></pre>
Another step towards the Anti-Mac user interface.<p><a href="https://www.nngroup.com/articles/anti-mac-interface/" rel="nofollow">https://www.nngroup.com/articles/anti-mac-interface/</a>
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't make it a bad feature.<p>git stauts<p>I mean, git knows enough to ask me "Did you mean this? status".
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='sudo $(history -p \!\!)'</code></pre>
Love 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.
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.