1.autojump
1.安装
brew install autojump
2.配置
vi ~/.zshrc
plugins=(
autojump
)
3.在source $ZSH/oh-my-zsh.sh后加入
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
# 这段文本在brew install autojump之后一般会提示给用户
4.更新配置
. ~/.zshrc
5.使用
# 原理
# 在你每次启动命令时记录你当前位置,并把它添加进它自身的数据库中,这样,某些目录比其它一些目录添加的次数多,这些目录一般就代表你最重要的目录,而它们的"权重"也会增大
j [目录]
2.zsh-syntax-highlighting
1.安装
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/
2.配置
vi ~/.zshrc
plugins=(
autojump
zsh-syntax-highlighting
)
3.更新
. ~/.zshrc
3.zsh-autosuggestion
1.安装
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions/
2.配置
vi ~/.zshrc
plugins=(
autojump
zsh-syntax-highlighting
zsh-autosuggestions
)
3.更新
. ~/.zshrc
4.history-substring-search
1.安装
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
2.配置
vi ~/.zshrc
plugins=(
autojump
zsh-syntax-highlighting
zsh-autosuggestions
history-substring-search
)
3.更新
. ~/.zshrc
4.设置
bindkey查看现在key绑定状态
# 绑定上/下方向键
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
5.使用
输入任意命令的部分,然后上/下方向键即可
5.git
# 系统自带,直接加入plugins中打开即可
6.extract
# 系统自带,直接加入plugins中打开即可
x file.zip/file.rar/file.tar.gz...