码迷,mamicode.com
首页 > 系统相关 > 详细

Linux 安装并配置zsh

时间:2019-11-22 01:31:39      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:title   nta   out   span   master   lin   too   which   users   

1. 安装zsh,配置agnoster主题

1.1 安装zsh

$ sudo apt-get install -y zsh

1.2 安装oh-my-zsh

$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

1.3 安装powerline font字体库

$ sudo apt-get install fonts-powerline

1.4 打开zsh配置文件 ~/.zshrc,修改主题为agnoster

1 # Set name of the theme to load --- if set to "random", it will
2 # load a random theme each time oh-my-zsh is loaded, in which case,
3 # to know which specific one was loaded, run: echo $RANDOM_THEME
4 # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
5 ZSH_THEME="agnoster"

1.5 将zsh设置为默认终端

$ chsh -s `which zsh`

1.6 注销,重新登陆

$ logout

 

2. 安装插件

2.1 进入插件路径

$ cd ~/.oh-my-zsh/plugins

2.2 下载自动补齐、高亮、建议插件

$ wget http://mimosa-pudica.net/src/incr-0.2.zsh
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
$ git clone https://github.com/zsh-users/zsh-autosuggestions
$ source incr*.zsh

2.3 修改配置文件

$ vi ~/.zshrc
1 plugins=(git
2 zsh-syntax-highlighting
3 zsh-autosuggestions)
4 
5 source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

 

Linux 安装并配置zsh

标签:title   nta   out   span   master   lin   too   which   users   

原文地址:https://www.cnblogs.com/ezrealiu/p/11909152.html

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