安装 Zsh

试验场所有 CentOS(本地 + 远程),Ubuntu 14.04+,MSYS2(比较卡,应该是 mintty 的原因,不打算继续折腾)。

安装 Zsh

1
2
yum install zsh
chsh -s /usr/bin/zsh

安装 Oh-My-Zsh

官方 repo

1
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

1
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

详情请见 oh-my-zsh 的 wiki

主题

  • Powerlevel9k:repo
    1
    git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
  • 自带主题:Themes
  • 额外主题:External themes

配置 zshrc

.zshrc (针对 powerlevel9k 主题)


秀一发:

其中所用字体为 Sauce Code Pro Nerd Font Complete Mono Windows Compatible,官方 repo

常见问题

  • 不能更新,提示 error: Cannot pull with rebase: You have unstaged changes.
    1
    2
    cd $ZSH && git stash && cd -
    upgrade_oh_my_zsh