About The F*ck
Dunno how y’all are feeling lately, but I just have a lot of curse words on my mind. And by complete coincidence (actually no really), continuing with my theme of terminal tricks I have discovered the most perfectly named, magnificent app: The Fuck. It corrects your previous console command. All you have to do is install it and type: fuck
.
Here’s an example that I have already used (twice):
➜ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
➜ fuck
git push --set-upstream origin master [enter/↑/↓/ctrl+c]
Counting objects: 9, done.
(And yes I’ve done git config --global push.autoSetupRemote true
but I just got a new work computer argh)
It also works on typos:
➜ git stats
git: 'stats' is not a git command. See 'git --help'.
The most similar command is
status
➜ fuck
git status [enter/↑/↓/ctrl+c]
On branch main
Your branch is up to date with 'origin/main'.
I suppose I could make aliases for all my common typos but this is way easier. Also, it’s fun to type swears in the terminal.
It auto-configures itself after you install it and type fuck
the first time, and even can configure itself with fish
(which I’m trying out on my work computer). Also, have I mentioned it’s fun to type swear words?