Table of Contents
个人感觉 zsh + oh-my-zsh 的强大之处有:
- 强大的补全: 环境变量,地址目录,命令,参数,
- 各种各样可加载使用的 plugin,各式的 theme,可定制
- alias
接下来详细列举我知道的 features:
- cd[SPACE][TAB] 目录补全提示
- cd h/l/p/b[TAB] 目录可自动补全成 /home/lord63/pictures/bing
- 配合使用 autojump 快速跳转目录
- 打一个命令的一部分按下 TAB,将会显示可能的命令
- git add -[TAB] 将会显示可能的参数
- 输入 d 会显示你这个会话访问过的目录,输入序号可以直接跳转
- 更聪明的命令历史,ls [UP] 将会显示上一条的 ls 命令.
- 有用的 prompt,比如对于 git 的能够显示当前分支,是否有修改
听说过但还不会的或者没用过的:
- globbing support, 不是太会
- CTRL+X CTRL+E 将一条长命令扔到编辑器里进行编辑
- kill
Resource
Farther reading
Install
$ sudo apt-get install zsh $ git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh $ cp ~/.zshrc ~/.zshrc.orig $ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc $ sudo chsh -s /bin/zsh Start or restart Zsh by opening a new command-line window.
Plugins I use(update on 2015.01.03)
- git
- autojump
- python
- pip
- vi-mode
- zsh-syntax-highlighting
- zsh-history-substring-search