当前位置: 首页 > news >正文

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

文章目录

    • 1. 安装指南
    • 2. 插件配置指南
    • 3. 参考信息

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
  • auto-jump
git clone https://github.com/wting/autojump.git

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

3. 参考信息

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

  • 备份目前我使用的所有插件:
plugins=(gitpipagpoetryzsh-autosuggestionsz                       # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/zzsh-syntax-highlighting # https://github.com/zsh-users/zsh-syntax-highlightingautojumpcopypath                     # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copypathcopyfile                     # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copyfilezsh-history-substring-search # https://github.com/zsh-users/zsh-history-substring-searchyou-should-use               # https://github.com/MichaelAquilina/zsh-you-should-use#installation
)
http://www.lryc.cn/news/235105.html

相关文章:

  • VS中修改解决方案名称和项目名称
  • iOS UITableView获取到的contentSize不正确
  • C++二分查找算法:查找和最小的 K 对数字
  • 开源WIFI继电器之方案介绍
  • html使用天地图写一个地图列表
  • C++ Qt 学习(九):模型视图代理
  • wpf devexpress 自定义统计
  • 【Flink】Flink任务缺失Jobmanager日志的问题排查
  • 教程:使用 Keras 优化神经网络
  • 什么是PWA(Progressive Web App)?它有哪些特点和优势?
  • 深入理解MongoDB的CRUD操作
  • 使用量子玻尔兹曼机推进机器学习:新范式
  • 优化|优化求解器自动调参
  • vite vue3配置eslint和prettier以及sass
  • C语言第入门——第十六课
  • IntelliJ IDEA 快捷键 Windows 版本
  • 重生之我必去大厂java开发
  • 2023年中职“网络安全“—Web 渗透测试②
  • 【整顿C盘】pycharm、chrome等软件,缓存移动
  • C# using语句使用介绍
  • leetcode (力扣) 201. 数字范围按位与 (位运算)
  • Flutter笔记: 在Flutter应用中使用SQLite数据库
  • OpenAI GPT5计划泄露
  • 【面试经典150 | 数学】Pow(x, n)
  • 封装比较好的登录页面
  • 如何使用Flask request对象处理请求
  • 快速搜索多个word、excel等文件中内容
  • Minio安装
  • Spring初识
  • 2023全新付费进群系统源码 带定位完整版 附教程