首页 > 其他 > 详细

centos安装zsh

时间:2020-07-31 17:22:29      阅读:73      评论:0      收藏:0      [点我收藏+]
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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!