• Log in
Anwen  Share and Create
  • Book
  • Movies
  • Music
  • SF
  • Goodlink
  • Asks
  • Eyeopen
  • Create

thefuck: 自动纠正前一个命令的拼写错误

Sharer: WTF-Daily-Blog March 6, 2017 at 3:40 pm
Link Share :http://blog.topspeedsnail.com/archives/5049 - via RSS

thefuck 是一个使用Python编写的开源小工具,它可以自动纠正前一个命令的拼写错误。这个工具非常酷,尤其对于常常使用命令行的童鞋。

thefuck支持Mac OS X和Linux系统。

Ubuntu安装thefuck

$ sudo apt install python3-dev python3-pip
$ sudo -H pip3 install thefuck

创建一个别名,首先编辑bashrc配置文件:

$ vim ~/.bashrc

在文件尾加入一行:

eval "$(thefuck --alias fuck)"

使生效:

$ source ~/.bashrc

使用示例:

$ sdo vim /etc/passwd

thefuck - 自动纠正前一个命令的拼写错误

直接回车执行纠正过的命令。

$ sudo atp-get install python

thefuck - 自动纠正前一个命令的拼写错误

thefuck - 自动纠正前一个命令的拼写错误

更多用法参看项目README。

作者暂无likerid, 赞赏暂由本网站代持,当作者有likerid后会全部转账给作者(我们会尽力而为)。

Tips: Until now, everytime you want to store your article, we will help you store it in Filecoin network. In the future, you can store it in Filecoin network using your own filecoin.


Support author:
Author's Filecoin address:
Or you can use Likecoin to support author:
tags:trick Linux命令行 thefuck 拼写错误 自动纠正

0 0

2012-2018 Anwen All of our posts are default licensed under CC BY 4.0 About Help Changelog Telegram
Today Quote: 我认为低智,偏执,思想贫乏是最大的邪恶。而聪明,达观,多知的人,比之别样的人更堪信任。 -- 王小波