作者:黔在在
来源:Github大本营
open your eyes!看这里,小编又来了。
image
小朋友
你是否有很多问号???
是不是没有看懂我的表情包呢?嘻嘻
The Fuck 跟我命令输错了有什么关系嘛?
image
不,当然有关系。
官方称,The Fuck 是一款宏伟的应用程序,可以纠正你以前的控制台命令。
就是如果你在终端输错了一个命令,不用纠正,你自己接着写个 fuck 就可以了,他就会自动帮你纠正,并且执行正确的命令。
➜ apt-get install vimE: 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?
➜ fucksudo apt-get install vim [enter/↑/↓/ctrl+c][sudo] password for nvbn:Reading package lists... Done...
可能上面的例子不是很直观,咱们可以直接看动图。
image
哇哦 ~ 发出尖叫鸡。是你想要的,对不对!
要求
python (3.4+)
pip
python-dev
安装
在 OS X 上,可以运行以下命令:
brew install thefuck
在 Ubuntu / Mint 上,可以运行以下命令:
sudo apt updatesudo apt install python3-dev python3-pip python3-setuptoolssudo pip3 install thefuck
在 FreeBSD 上,可以运行如下命令:
pkg install thefuck
在 ChromeOS 上,可以运行如下命令:
crew install thefuck
在 其他系统上,可以运行如下命令:
pip install thefuck
配置
#编辑 bashrc 配置文件vim ~/.bashrc#在文件尾加入一行给thefuck取别名fuckeval "$(thefuck --alias fuck)"#使配置生效source ~/.bashrc
在在在这里附上开源项目的地址,更多安装方式与使用方法以及 The Fuck 是怎么工作的请看:
https://github.com/nvbn/thefuck
---------End---------
关注后回复“w”,加我私人微信
“分享”和“在看”是更好的支持!