玩转zsh2

在 Ubuntu Linux 中安�b Zsh 及 Oh-my-zsh

直接用 apt-get 安�b zsh 套件

Java代码  收藏代码

  1. $ apt-get install zsh  

  2. $ zsh --verison  

  3. zsh 4.3.17  

 

�� GitHub 下�d oh-my-zsh 套件

Java代码  收藏代码

  1. $ git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh  

 

如果本��]有安�b zsh 可以直接使用 oh-my-zsh 的�例 zshrc

Java代码  收藏代码

  1. $ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc  

 

看看有什�N Theme 可以用

Java代码  收藏代码

  1. $ ls ~/.oh-my-zsh/themes  

 

�� ~/.zshrc 更�Q zsh 的 theme 我自己喜�g用 candy

Java代码  收藏代码

  1. ZSH_THEME="candy"  

 

看看有什�N Plugin 可以用

Java代码  收藏代码

  1. $ ls ~/.oh-my-zsh/plugins  

 

�� ~/.zshrc �⒂� Plugin

Java代码  收藏代码

  1. plugins=(git git-flow debian grails rvm history-substring-search github gradle svn node npm zsh-syntax-highlighting sublime)  

 

下�d zsh-syntax-highlighting plugin

Java代码  收藏代码

  1. $ cd ~/.oh-my-zsh/custom/plugins  

  2. $ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git  

 

新增自� zsh �O定,我��把 alias 和 PATH 的�O定放在�@�

Java代码  收藏代码

  1. $ cat ~/.oh-my-zsh/custom/xxx.zsh  

  2. alias df='df -h'  

  3. alias h='htop'  

  4.   

  5. PATH=$PATH:/opt/app/bin/  

 

来源:http://shyuan.github.io/blog/2012/07/10/install-zsh-and-oh-my-zsh-in-ubuntu-linux/

 

Make ZSH default

Java代码  收藏代码

  1. chsh -s /bin/zsh  

 

Restart your system.


你可能感兴趣的:(fun)