Mac下命令行自动提示

命令行提示工具,便于命令的正确书写,效果如图:

tarruda/zsh-autosuggestions 下参考Manually 项安装。

Manually
1、Clone this repository to ~/.zsh/zsh-autosuggestions (or anywhere else):
git clone git://github.com/tarruda/zsh-autosuggestions ~/.zsh/zsh-autosuggestions

2、Clone zsh-syntax-highlighting repository to ~/.zsh/zsh-syntax-highlighting (or anywhere else):
git clone git://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting

3、Load and enable autosuggestions; copy the following snippet and put it to your .zshrc file:
# Load zsh-syntax-highlighting. source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

# Load zsh-autosuggestions. source ~/.zsh/zsh-autosuggestions/autosuggestions.zsh

# Enable autosuggestions automatically.
zle-line-init() {
zle autosuggest-start
}
zle -N zle-line-init

4、Reopen your terminal.

posted @ 2016-01-27 11:35  Forrest.Wang  阅读(3187)  评论(0编辑  收藏  举报