linux或mac上安装zsh以及自动提示/语法高亮等

安装 zsh

mac 安装: brew install zsh
Ubuntu 安装: sudo apt-get install zsh
CentOS 安装: yum install zsh
其他的自行查找

下载 oh-my-zsh

git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
或
git clone https://gitee.com/who7708/oh-my-zsh.git ~/.oh-my-zsh

创建 .zshrc 配置文件

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

更改默认 Shell

查询位置并设置:
which zsh
/usr/bin/zsh
chsh -s /usr/bin/zsh

下载相关插件 zsh-autosuggestions,zsh-syntax-highlighting,zsh-completions,zsh-history-substring-search

.zshrc 配置文件中找到plugins,加入插件及其他配置。插件直接下载后放置目录: ~/.oh-my-zsh/custom/plugins

cd ~/.oh-my-zsh/custom/plugins

github地址:
git clone https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions
git clone https://github.com/zsh-users/zsh-history-substring-search

gitlab地址:
git clone https://gitee.com/who7708/zsh-syntax-highlighting
git clone https://gitee.com/who7708/zsh-autosuggestions
git clone https://gitee.com/who7708/zsh-completions
git clone https://gitee.com/who7708/zsh-history-substring-search
vim ~/.zshrc

// 添加或修改如下:

plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
  zsh-completions
  zsh-history-substring-search
)

// ......

alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias tailf='tail -20f'

插件github地址:

插件gitlab地址:

下载压缩包安装

直接下载提供的压缩包,解压到对应目录下即可。下载地址

转载于:https://my.oschina.net/who7708/blog/2961842

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值