站长建站专辑PHP建站

thefuck:Linux中一款可以自动纠正前一个命令行错误的工

2018-10-07  本文已影响1人  8fb46c170015

你是否是常常在终端敲错号令?敲错号令,删掉重敲,很烦有无?当你几回再三敲错的时辰,心里必然是分裂的,必然在默念What The FUCK!。这么就thefuck神器就出生了。thefuck不只能修复字符输入次第的毛病,许多在你此外想说fuck的状况下,thefuck仍旧有用,归正只需你由于号令的成绩报错,请就fuck一下。

截图

示例

1,号令拼写不合错误

# puthonNo command 'puthon' found, did you mean:Command 'python' from package 'python-minimal' (main)Command 'python' from package 'python3' (main)zsh: command not found: puthon# fuckpythonPython 3.4.2

2,号令输错

# git brnchgit: 'brnch' is not a git command. See 'git --help'.Did you mean this?branch# fuckgit branch* master

3,权限不敷

# 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[sudo] password for nvbn:Reading package lists... Done

装置

如图1所示,装置thefuck

运转以下号令:

#CentOS体系yum -y update && yum -y install gccwget https://bootstrap.pypa.io/get-pip.pypython get-pip.py && yum -y install python-develsudo -H pip install thefuck#Ubuntu/Debian体系sudo apt updatesudo apt install python3-dev python3-pipsudo pip3 install thefuck

装置更多应用及检察方式Github项目地点:HTTPS://github.com/nvbn/thefuck。

2,配备

#编纂bashrc配备文献vim ~/.bashrc#在文献尾进入一行eval "$(thefuck --alias fuck)"#使见效source ~/.bashrc

上一篇下一篇

猜你喜欢

热点阅读