强大的Oh my Zsh

安装

查看是否已经安装:运行 cat /etc/shells 或 chsh -l ,如果已经安装,则会看到输出结果中有 /bin/zsh 一行内容。

配置文件.zshrc

编辑配置文件 pico ~/.zshrc


Zsh简体中文网址

https://wiki.archlinux.org/index.php/Zsh_(简体中文)#.E7.94.A8.E4.BA.8E.E5.AE.9A.E5.88.B6.E7.9A.84.E9.85.8D.E7.BD.AE.E6.96.87.E4.BB.B6_.7E.2F.zshrc

设为默认 Shell

Zsh 配置文件为 ~/.zshrc (个人配置) 和 /etc/zshrc (系统全局)。

将 Zsh 设为终端模拟器默认使用的 Shell:

$ chsh -s zsh #不必以 root 身份运行,但需要输入管理员密码

更多定制:oh-my-zsh

  1. 下载 & 安装 oh-my-zsh(二选一):

    ①通过 curl

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

②通过 wget

wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
  1. 命令提示符主题设置
$ cd ~/.oh-my-zsh/tools
$ ./theme_chooser.sh #主题选择工具

部分提示符主题截图可查看 oh-my-zsh wiki,手动修改 ~/.zshrc 文件中 ZSH_THEME 一行内容,设置自己喜欢的主题。

  1. 插件

oh-my-zsh 提供了 100 多个插件,可根据自己需求来设置。

主题:

以下是主题列表以及截图
https://github.com/robbyrussell/oh-my-zsh/wiki/themes


相关链接

  • oh-my-zsh wiki
  • Archlinux Wiki
  • OpenSUSE Wiki

你可能感兴趣的:(MAC)