ubuntu里zsh插件设置

安装zsh-syntax-highlighting插件

先下载源码:
cd ~/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git

打开~/.zshrc文件,找到以下段落:

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
    # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
    # Example format: plugins=(rails git textmate ruby lighthouse)
    # Add wisely, as too many plugins slow down shell startup.
    plugins=(git)

按照注释中的提示改成:
plugins=(git zsh-syntax-highlighting)

安装autojump插件

先下载源码:
git clone git://github.com/joelthelion/autojump.git
然后安装该程序:

cd autojump
./install.py

~/.zshrc文件中加入以下代码:

 # install autojump
[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh

安装Powerline-Shell插件

先下载源码:
git clone https://github.com/milkbikis/powerline-shell
再安装:

 cd powerline-shell
 ./install.py
 ln -s <path/to/powerline-shell.py> ~/powerline-shell.py

再配置~/.zshrc文件,在其末尾加入如下代码:

# install powerline-shell
function powerline_precmd() {
  export PS1="$(~/powerline-shell.py  --cwd-max-depth 1 --cwd-only $? --shell zsh 2> /dev/null )"
}

function install_powerline_precmd() {
  for s in "${precmd_functions[@]}"; do
    if [ "$s" = "powerline_precmd" ]; then
      return
    fi
  done
  precmd_functions+=(powerline_precmd)
}
install_powerline_precmd
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值