GitHub 上有什么好的或者有趣的 Shell 项目?

当然是 the fuck (

nvbn/thefuck · GitHub

)了!!!!

当你用 linux terminal 出现手脚无力、头晕恶心,严重的话发生心肌梗塞的症状的时候,是不是想大叫 WTF ~~ 这个 shell 脚本将为你们带来福音。

比如,你要安装 vim 时:

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

WTF !!此时,你应该狠狠地在 terminal 中打出:

➜ fuck
sudo apt-get install vim
[sudo] password for nvbn:
Reading package lists... Done
...

真是速效救心丸啊,心情瞬间顺畅很多。

人生苦短,写段 python 呗,于是你在 ternimal 中打出来:

➜ puthon
No command 'puthon' found, did you mean:
 Command 'python' from package 'python-minimal' (main)
 Command 'python' from package 'python3' (main)
zsh: command not found: puthon

WTF !!! 手这么残!!不过没事,快打出:

➜ fuck
python
Python 3.4.2 (default, Oct  8 2014, 13:08:17)
...

真特么爽。

ps: 我对题目一开始理解有误,我刚开始一看 shell 项目,便想到 the fuck 了,但是没想到它是 python 写的,只是与 shell 有关罢了,当然,它非常有趣。大家开心就好。

编辑于 2015-06-18 11:56

Published

Category

Zhihu

Tags