2016/05/08

Ubuntu 安装和配置 Oh My Zsh

参考文档

要安装 zsh,首先需要安装 gitcurl

$ sudo apt-get install git
$ sudo apt-get install git-core
$ sudo apt-get install curl

$ git --version
$ curl --version

安装 zsh

$ sudo apt-get install zsh
$ zsh --version

设置zsh 为你的默认 shell

$ chsh -s $(which zsh)

安装 oh my zsh

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

更新 oh my zsh

$ upgrade_oh_my_zsh

遇到问题

[Oh My Zsh] Would you like to check for updates?
Type Y to update oh-my-zsh: Y
Upgrading Oh My Zsh
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
There was an error updating. Try again later?

解决办法

  • Open up Terminal
  • Type in ‘~/.oh-my-zsh’, this should change your directory to the zsh directory.
    -Terminal should read: " .oh-my-zsh git:(master) ". If it does, go to step 3.
  • Type in “git status” to see that your status is ahead of master.
    -If you’re not concerned about the file status changes, you can “stash” those changes by doing step 4.
  • Type in “git stash” to save the progress in the git and move the head back to master.
  • Done. Now you should be able to upgrade the next time the terminal asks you too.

更改主题

$ vim ./zshrc

修改为你想要的主题即可,我采用的是 ZSH_THEME="wezm"

没有评论:

发表评论