oh-my-zsh国内源安装及配置

介绍

国内源的oh-my-zsh库,对代码中的相关网址进行了替换(已在下面列出),以实现:

  1. 和原官方一样,使用命令在线安装(无需克隆到本地);
  2. 支持后期自动升级(对照本仓)。

基本上每个月还是会更新,代码仓库地址:
https://gitee.com/pocmon/ohmyzsh

安装

1.首先确保zsh的安装

sudo apt install git zsh -y 

2.然后使用curl或者wget工具进行在线安装

  • 使用 curl 安装
sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"
  • 使用 wget 安装
sh -c "$(wget -O- https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"

插件

  1. zsh-syntax-highlighting
git clone https://gitee.com/asddfdf/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. zsh-autosuggestions
git clone https://gitee.com/chenweizhen/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

配置

  1. 配置.zshrc
source .zshrc

2.主题

ZSH_THEME="agnoster"

(很多主题使用powerline font

sudo apt-get install fonts-powerline

3.插件

plugins=(  #other  zsh-syntax-highlighting zsh-autosuggestions)

4.起用

source .zshrc
posted @ 2022-10-25 11:49  chencarl  阅读(5131)  评论(0编辑  收藏  举报