Centos 7 安装"Thefuck"详细步骤

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos 7 安装"Thefuck"详细步骤相关的知识,希望对你有一定的参考价值。

安装需求

  • python (2.7+ or 3.3+)

  • pip

  • python-devel

python的安装:

Centos7中,自带了Python,而且版本在2.7+,不再另外安装。

pip的安装:

#wget 
# tar -xzvf pip-9.0.1.tar.gz
# cd pip-9.0.1
# python setup.py install

python-devel的安装:

    #yum -y install  python-devel.x86_64

准备环境做好后,开始安装“Thefuck”:

    #pip install  thefuck

下载完成后配置:

#vim ~/.bashrc

添加别名:

alias fuck=‘eval $(thefuck $(fc -ln -1)); history -r‘

====================================

大功告成。

[[email protected] ~]# ssytemctl restart network
bash: ssytemctl: 未找到命令...
相似命令是: ‘systemctl‘
[[email protected] ~]# fuck
systemctl restart network [enter/↑/↓/ctrl+c]   
[[email protected] ~]#

Fuck后会有多种结果,这时候需要按上下键进行选择。


本文出自 “兔子先生” 博客,请务必保留此出处http://12773668.blog.51cto.com/12763668/1925021

以上是关于Centos 7 安装"Thefuck"详细步骤的主要内容,如果未能解决你的问题,请参考以下文章

thefuck安装和使用(ubuntu)

超详细的 "CentOS 7.9" 系统安装教程

调试 --- debugtoolbar|thefuck

终端神器 Thefuck,再也不用担心敲错命令了

centos 7安装中怎么组ride

命令纠正工具 thefuck 的简单使用