Π”Π°-Π΄Π°, Π²Ρ‹ Π½Π΅ ΠΎΡΠ»Ρ‹ΡˆΠ°Π»ΠΈΡΡŒ. ИмСнно Ρ‚Π°ΠΊ — the fuck — называСтся эта консольная ΡƒΡ‚ΠΈΠ»ΠΈΡ‚Π°, сырцы ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠΉ ΠΌΠΎΠΆΠ½ΠΎ Π½Π°ΠΉΡ‚ΠΈ Π½Π° Π³ΠΈΡ‚Ρ…Π°Π±.

Π­Ρ‚Π° волшСбная ΡƒΡ‚ΠΈΠ»ΠΈΡ‚Π° Π΄Π΅Π»Π°Π΅Ρ‚ ΠΎΠ΄Π½Ρƒ ΠΎΡ‡Π΅Π½ΡŒ ΠΏΠΎΠ»Π΅Π·Π½ΡƒΡŽ Ρ€Π°Π±ΠΎΡ‚Ρƒ — исправляСт ошибки Π² послСднСй Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½Π½ΠΎΠΉ ΠΊΠΎΠΌΠ°Π½Π΄Π΅ Π² консоли.

ΠŸΡ€ΠΈΠΌΠ΅Ρ€Ρ‹

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

ВрСбования

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

Установка

OS X

brew install thefuck

Ubuntu / Mint

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

FreeBSD

pkg install thefuck

ChromeOS

crew install thefuck

На Π΄Ρ€ΡƒΠ³ΠΈΡ… систСмах

Π‘ ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ pip

pip install thefuck

ΠŸΠΎΠ»Π΅Π·Π½Ρ‹Π΅ ΠΎΠΏΡ†ΠΈΠΈ

Для Ρ€Π°Π±ΠΎΡ‚Ρ‹ Π±Π΅Π· запросов Π½Π° подтвСрТдСния

fuck —yeah

Для выполнСния рСкурсивно Π΄ΠΎ достиТСния Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚Π°

fuck -r

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ: linux.org.ru