Is The Fuck too slow? Try the experimental instant mode!
➜ apt-get install vim E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? ➜ fuck sudo apt-get install vim [enter/↑/↓/ctrl+c] [sudo] password for nvbn: Reading package lists... Done ...
➜ 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. ...
➜ puthon No command 'puthon' found, did you mean: Command 'python' from package 'python-minimal' (main) Command 'python' from package 'python3' (main) zsh: command not found: puthon ➜ fuck python [enter/↑/↓/ctrl+c] Python 3.4.2 (default, Oct 8 2014, 13:08:17) ...
➜ git brnch git: 'brnch' is not a git command. See 'git --help'. Did you mean this? branch ➜ fuck git branch [enter/↑/↓/ctrl+c] * master
➜ lein rpl 'rpl' is not a task. See 'lein help'. Did you mean this? repl ➜ fuck lein repl [enter/↑/↓/ctrl+c] nREPL server started on port 54848 on host 127.0.0.1 - nrepl://127.0.0.1:54848 REPL-y 0.3.1 ...
If you're not afraid of blindly running corrected commands, the
require_confirmation settings option can be disabled:
➜ apt-get install vim E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? ➜ fuck sudo apt-get install vim [sudo] password for nvbn: Reading package lists... Done ...
- python (3.4+)
brew install thefuck
On Ubuntu / Mint, install The Fuck with the following commands:
sudo apt update sudo apt install python3-dev python3-pip python3-setuptools sudo pip3 install thefuck
On FreeBSD, install The Fuck with the following commands:
pkg install thefuck
On ChromeOS, install The Fuck using chromebrew with the following command:
crew install thefuck
On other systems, install The Fuck by using
pip install thefuck
# It is recommended that you place this command in your
.zshrc or other startup script:
eval $(thefuck --alias) # You can use whatever you want as an alias, like for Mondays: eval $(thefuck --alias FUCK)
Changes are only available in a new shell session. To make changes immediately available, run
source ~/.bashrc (or your shell config file like
To run fixed commands without confirmation, use the
--yeah option (or just
-y for short, or
--hard if you're especially frustrated):
To fix commands recursively until succeeding, use the
pip3 install thefuck --upgrad