标签:oh my zsh
什么是Zsh Zsh和bash一样,是一种Unix shell,但大多数Linux发行版本都默认使用bash shell。但Zsh有强大的自动补全参数、文件名、等功能和强大的自定义配置功能。 替换Mac的bash Zsh虽然功能强大,但刚上手配置比较麻烦。别担心,Github已经有开源项目oh-my-zsh。按照官方的文档安装,非常简单。 一、使用curl自动安装 curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh 二、手动安装 1.使用git clone 项目 git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh 2.备份~/.zshrc文件 cp ~/.zshrc ~/.zshrc.orig 3.创建新的zsh配置文件 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 4.设置zsh为默认shell chsh -s /bin/zsh 5.重启Terminal或新建一个Terminal就可以看到效果了 接下来配置适合自己Zsh 进入主题文件夹查看全部主题, # cd ~/.oh-my-zsh/themes 编辑配置 # vi ~/.zshrc --------------------- # time that oh-my-zsh is loaded. ZSH_THEME="tonotdo" ------------------------ 1.主题修改,我比较喜欢前面是$符号,所以选择了tonotdo这款主题 ZSH_THEME="junkfood" 效果:#( 12/19/14@ 9:05上午 )( cheenwe@works ):~/workspace/zhihe@7-change-12.17 ys # cheenwe at works in ~/workspace/zhihe on git:7-change-12.17 o [9:07:30] $ ZSH_THEME="jtriley 9:08 cheenwe@works /home/cheenwe/workspace/zhihe % ZSH_THEME="xiong-chiamiov" ┌─[cheenwe@works] - [~/workspace/zhihe] - [五 12月 19, 09:09] └─[$]> ZSH_THEME="xiong-chiamiov-plus" ┌─[cheenwe@works] - [~/workspace/zhihe] - [五 12月 19, 09:09] └─[$] <git:(7-change-12.17)> ZSH_THEME="josh" cheenwe@works /home/cheenwe/workspace/zhihe (ruby-2.1.5) 7-change-12.17 ZSH_THEME="jonathan" ┌─(~/workspace/zhihe)(ruby-2.1.5)──────────────────────(cheenwe@works:pts/17)─┐ └─(09:12:08 on 7-change-12.17)──> ZSH_THEME="wedisagree" [zhihe] 9:13:51 7-change-12.17 ZSH_THEME="tonotdo" cheenwe~/workspace/zhihe(7-change-12.17) [9:15:28] 3den kafeitu adben kardan af-magic kennethreitz afowler kiwi agnoster kolo alanpeabody kphoen amuse lambda apple linuxonly arrow lukerandall aussiegeek macovsky-ruby avit macovsky awesomepanda maran bira mgutz blinks mh bureau michelebologna candy-kingdom mikeh candy miloshadzic clean minimal cloud mortalscumbag crcandy mrtazz crunch murilasso cypher muse dallas nanotech darkblood nebirhos daveverwer nicoulaj dieter norm dogenpunk obraun dpoggi peepcode dstufft philips dst pmcgee duellj pure
标签:oh my zsh
原文地址:http://cpple.blog.51cto.com/6719977/1592815