ohmyzsh用在mysql_Linux 安装 zsh & oh-my-zsh

一、安装zsh和选择zsh

yum install zsh

zsh --version

cat /etc/shells

chsh -s /bin/zsh

二、安装 oh my zsh

$ wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

卸载:

uninstall_oh_my_zsh

三、配置主题

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

vim ~/.zshrc

ZSH_THEME="ys"

disable_auto_update = true

四、配置插件

1、Incremental 自动补全插件(智能提示)

mkdir ~/.oh-my-zsh/plugins/incr

wget -P ~/.oh-my-zsh/plugins/incr http://mimosa-pudica.net/src/incr-0.2.zsh

source ~/.oh-my-zsh/plugins/incr/incr*.zsh

2、zsh-syntax-highlighting

描述:日常用的命令会高亮显示,命令错误显示红色

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

3、 zsh-autosuggestion

描述:输入命令时可提示自动补全(灰色部分),然后按键盘 → 即可补全,有效路径会有下划线。

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

4、 autojump

描述:实现目录间快速跳转,想去哪个目录直接 j + 目录名,不用在频繁的 cd 了! quyin die

linux 系统

git clone git://github.com/wting/autojump.git

cd autojump

./install.py or ./uninstall.py

[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh && autoload -U compinit && compinit -u

autojump --help

autojump --purge

j --stat

5、zsh-completions

git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions

plugins=(… zsh-completions)

五、配置文件:

# cat ~/.zshrc| grep -v "#"| grep -v "^$"

export ZSH=$HOME/.oh-my-zsh

ZSH_THEME="ys"

plugins=(git colored-man-pages zsh_reload sudo zsh-completions autojump zsh-autosuggestions)

source $ZSH/oh-my-zsh.sh

#source ~/.oh-my-zsh/plugins/incr/incr*.zsh

source ~/.oh-my-zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

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

autoload -U compinit && compinit -u

六、 fish shell

对于 RHEL 7,请以根用户 root 运行下面命令:

cd /etc/yum.repos.d/

wget https://download.opensuse.org/repositories/shells:fish:release:3/RHEL_7/shells:fish:release:3.repo

yum install fish

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值