码迷,mamicode.com
首页 > 其他好文 > 详细

centos安装zsh

时间:2020-07-31 19:20:37      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:master   tool   插件   centos   sse   fss   vim   custom   shel   

yum install -y zsh #安装zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" #安装oh my zsh or sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" cat /etc/shells #查看本地有哪几种shell chsh -s /bin/zsh #切换到zsh,默认已经切换了

安装语法高亮插件 zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

自动补全插件 zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

跳转插件 autojump

git clone git://github.com/joelthelion/autojump.git
# 进入clone目录,接着执行安装文件
cd autojump
./install.py
# 接着根据安装完成后的提示,在~/.zshrc最后添加下面语句:
vim ~/.bashrc    
[[ -s /home/misfit/.autojump/etc/profile.d/autojump.sh ]] && source /home/misfit/.autojump/etc/profile.d/autojump.sh

启用插件

vim ~/.zshrc    
# 在plugins后括号里添加安装的插件名字
plugins=( git 
            autojump 
            zsh-autosuggestions 
            zsh-syntax-highlighting
            )

然后重新登录初始化
su -

centos安装zsh

标签:master   tool   插件   centos   sse   fss   vim   custom   shel   

原文地址:https://blog.51cto.com/14891899/2515343

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!