CentOS7安装cheat

前提

安装python

linux默认已经有

安装git

yum install git

安装pip

执行命令:yum install python-pip,发现不存在;
然后执行命令:yum -y install epel-release
再次执行命令:yum install python-pip,可以正常安装
升级pip:yum install python-pip

安装cheat

安装所需要的python依赖包

pip install docopt pygments

复制cheat的Git库

git clone https://github.com/chrisallenlane/cheat.git

进入cheat目录,运行‘setup.py’

# cd cheat
# python setup.py install

验证cheat的安装

cheat -v

常用配置

如果使用的是bash,则配置文件为.bashc;
如果使用的是zsh,则配置文件为.zshrc;

export EDITOR = /usr/bin/vim # 默认编辑器
export CHEATCOLOR=true   # 语法高亮

参考:

http://blog.csdn.net/yulei_qq/article/details/52984334
https://linux.cn/article-3760-1.html

posted @ 2018-03-04 09:37  岳麓丹枫  阅读(268)  评论(0编辑  收藏  举报