zsh和ohmyzsh安装指南+插件推荐

1. 安装指南

在这里插入图片描述

1. 安装 zsh

sudo apt install zsh

2. 安装 Oh My Zsh
在这里插入图片描述

  • 国内访问GitHub
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

这将安装 Oh My Zsh 和所有默认插件。

# install 
git clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
cd ohmyzsh/tools
REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh install.sh

# change source 
git -C $ZSH remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
git -C $ZSH pull

3. 设置 zsh 为默认 shell

chsh -s $(which zsh)

2. 插件配置指南

所有的插件都应该下载到 ~/.oh-my-zsh/custom/plugins
推荐 GitHub 的开源项目: awesome-zsh-plugins, 可以找到所有目前主流程序猿使用的插件列表。


  • auto suggestions
    非常好用的一个插件,会记录你之前输入过的所有命令,并且自动匹配你可能想要输入命令,然后按→补全
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  • zsh-syntax-highlighting
    命令太多,有时候记不住,等输入完了才知道命令输错了,这个插件直接在输入过程中就会提示你,当前命令是否正确,错误红色,正确绿色
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/wting/autojump.git

之后执行./install.py 文件,即可安装成功

3. 参考信息

ohmyzsh的GitHub主页地址
插件安装指南

  • 备份目前我使用的所有插件:
plugins=(
    git
    pip
    ag
    poetry
    zsh-autosuggestions
    z                       # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/z
    zsh-syntax-highlighting # https://github.com/zsh-users/zsh-syntax-highlighting
    autojump
    copypath                     # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copypath
    copyfile                     # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copyfile
    zsh-history-substring-search # https://github.com/zsh-users/zsh-history-substring-search
    you-should-use               # https://github.com/MichaelAquilina/zsh-you-should-use#installation
)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

早睡的叶子

你的鼓励就是我的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值