美文网首页
ubuntu 16.04安装配置zsh

ubuntu 16.04安装配置zsh

作者: 梦落迹南天 | 来源:发表于2019-10-15 20:59 被阅读0次

安装zsh

apt-get install zsh

切换shell到zsh

chsh -s /bin/zsh 

安装oh my zsh(一个zsh的配置管理插件)

sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

打开~/.zshrc,将主题设置为流行的agnoster

ZSH_THEME="agnoster"

安装autojunmp

apt-get install autojump

添加至~/.zshrc中,使之生效

. /usr/share/autojump/autojump.sh

一些按键的绑定

#Rebind HOME and END to do the decent thing:
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
case $TERM in (xterm*)
bindkey '\eOH' beginning-of-line
bindkey '\eOF' end-of-line
esac

#To discover what keycode is being sent, hit ^v
#and then the key you want to test.

#And DEL too, as well as PGDN and insert:
bindkey '\e[3~' delete-char
bindkey '\e[6~' end-of-history
bindkey '\e[2~' redisplay

#Now bind pgup to paste the last word of the last command,
bindkey '\e[5~' insert-last-word

重启脚本

source ~/.zshrc

相关文章

网友评论

      本文标题:ubuntu 16.04安装配置zsh

      本文链接:https://www.haomeiwen.com/subject/dpkemctx.html