美文网首页
mac配置彩色shell(oh my zsh)

mac配置彩色shell(oh my zsh)

作者: xiangshun | 来源:发表于2015-09-08 20:47 被阅读0次

1、克隆这个项目到本地(前提是你得有装git)

<pre><code>git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh</code></pre>

2、创建一个zsh的配置文件

注意:如果你已经有一个~/.zshrc文件的话,建议你先做备份

。使用以下命令

<pre><code>cp ~/.zshrc ~/.zshrc.orig</code></pre>

然后开始创建zsh的配置文件

<pre><code>cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc</code></pre>

3、设置zsh为你的默认的shell

<pre><code>chsh -s /bin/zsh</code></pre>

4、重启并开始使用你的zsh (打开一个新的终端窗口便可…)

至此,大功告成。

更改zsh主题:

1、编辑 ~/.zshrc

2、修改

<pre><code>ZSH_THEME="ys"</code></pre>

注:主题文件在 ~/.oh-my-zsh/themes 目录

相关文章

网友评论

      本文标题:mac配置彩色shell(oh my zsh)

      本文链接:https://www.haomeiwen.com/subject/qwfpcttx.html