配置 zsh

1. 安装zsh
2. 将zsh设置为默认shell
	a. 修改/etc/passwd
	b. 在欲使用zsh的用户后面将shell由/bin/bash改为/usr/bin/zsh
3. 安装oh my zsh
	a. wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
4. 设置zsh
	a. 修改主题
		i. 在 .zshrc 里面修改ZSH_THEME="tonotdo",此时主题为tonotdo,主题列表https://github.com/robbyrussell/oh-my-zsh/wiki/Themes  
	b. 添加插件
		i. 在 .zshrc 里面的 plugins=(git) 行的git后面添加插件名字,我的为 plugins=(git zsh-autosuggestions zsh-syntax-highlighting autojump extract)说明我安装了括号里的所有插件
		ii. 其中有的插件需要安装额外的东西或者添加额外的内容到 .zshrc 中
			1) autojump
				a) 先用apt安装autojump,
				b) 安装好之后,需要在~/.zshrc中配置一下,除了在plugins中增加autojump之外,还需要添加一行:
				[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh
				c) 安装好之后,记得source ~/.zshrc
			2) zsh-autosuggestions
				a) sudo git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH/custom/plugins/zsh-autosuggestions 
			3) zsh-syntax-highlighting  
				a) sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/custom/plugins/zsh-syntax-highlighting    
			4) extract
				a) 解压文件用的,所有的压缩文件,都可以直接x filename,不用记忆参数
				当然,如果你想要用tar命令,可以使用tar -加tab键,zsh会列出参数的含义。
	c. 若要修改主题,把在$ZSH/themes的主题复制到$ZSH/custom/themes中去,然后再修改,因为custom中的配置会覆盖原配置
	d. 去掉提示命令的下划线
		i. 在.zshrc中添加如下内容
			ZSH_HIGHLIGHT_STYLES[path]=none
			ZSH_HIGHLIGHT_STYLES[path_prefix]=none
	e. source ~/.zshrc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值