个人使用的开发Mac,很早就用别人给的教程配置好了Zsh,使用一直很舒服,这次在自己的deepin上配置一次,这里做个简单记录。
安装清单
| 名称 | 备注 | 链接 | 
|---|---|---|
| zsh | shell的一种 | https://www.zsh.org/ | 
| oh-my-zsh | zsh的配置工具 | https://ohmyz.sh/ | 
| zsh-autosuggestions | 命令自动补全插件 | https://github.com/zsh-users/zsh-autosuggestions | 
| zsh-syntax-highlighting | 命令高亮插件 | https://github.com/zsh-users/zsh-syntax-highlighting | 
| Powerline | 个人用主题的字体(不用会乱码) | https://github.com/powerline/fonts | 
| iTerm2 | Mac下一个推荐的终端 | http://iterm2.com/ | 
安装过程
1. 安装zsh
各家平台的包管理工具都可以安装。
2. 安装oh-my-zsh
| 1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | 
推荐使用curl方式,会修改shell默认为zsh。
3. 修改配置
编辑.zshrc,找到主题,修改为:
| 1 | ZSH_THEME="agnoster" | 
重启终端,会更换主题。更换后会发现有部分乱码。
4. 解决字体乱码问题
安装powerline:
| 1 | # clone | 
配置字体为:Meslo LG M for Powerline
卸载执行:
| 1 | ./uninstall.sh | 
5. 安装插件
| 1 | git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | 
安装完成后,修改.zshrc
| 1 | plugins=( | 
重启终端。
6. 其他
Mac上的配色方案可以用solarized
| 1 | # git下Solarized 的源码 |