example
Github: https://github.com/nvbn/thefuck
As you can see in the GIF above, this tool could help us correct our commands.
I wonder if you, like me, have ever used some highly effective commands but then, when trying to use them again, forgot the correct command name or how to add the parameters. With this tool, we will have the opportunity to find the exact command we want to use based solely on vague fragments of our memory.
For instance, if I wanna get into python interpreter but mistyped puthon
, the shell would response with puthon: command not found
. In such a situation, I can simply say fuck
, and the shell will infer the intended command.
fuck
How can I install it?
The README file of the thefuck
Github repository informs us the installation command. Click here to navigate to README.md
-> Installation
For MacOS
Just simply type brew install thefuck
into the terminal.
Regarding Linux
One may utilize the package management tool provided by the Linux distribution for installation purpose. For instance, if you are on Arch Linux, the command sudo pacman -S thefuck
may be employed for installation.
On other systems
We can install thefuck
by using pip
:
pip install thefuck