Git Bash 安装 zsh 和 on-my-zsh

2022-11-04  本文已影响0人  洗洗睡吧i

ref: (https://dominikrys.com/posts/zsh-in-git-bash-on-windows/)

1. 安装 zsh

https://packages.msys2.org/package/zsh?repo=msys&variant=x86_64

aria2c -c -s 8 -x 8 https://mirror.msys2.org/msys/x86_64/zsh-5.8-5-x86_64.pkg.tar.zst
scoop install zstd

\etc\usr 文件夹解压到本机 git 的安装目录:

zsh

autoload -U zsh-newuser-install
zsh-newuser-install -f

if [ -t 1 ]; then
  exec zsh
fi

2. 安装 oh-my-zsh

$ sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

# gitee 镜像
$ sh -c "$(wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh -O -)"
# 主题
ZSH_THEME="ys"

# 插件
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

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

No newline at end of file

上一篇 下一篇

猜你喜欢

热点阅读