The Fuck

Yes, yes, you heard right. That's right - the fuck - this console utility is called, whose raw materials can be found on github.

This magical utility does one very useful job - it fixes errors in the last command executed in the console.

Examples

➜ 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
...

or as

➜ 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.
...

Requirements

  • python (3.4+)
  • pip
  • python-dev

Installation

OS X

brew install the fuck

Ubuntu/Mint

sudo apt update
sudo apt install python3-dev python3-pip python3-setuptools
sudo pip3 install thefuck

FreeBSD

pkg install the fuck

ChromeOS

crew install the fuck

On other systems

With pip

pip install the fuck

Useful Options

To work without confirmation prompts

fuck-yeah

To execute recursively until the result is reached

fuck-r

Source: linux.org.ru

Add a comment