Window 10 下终端配置与美化

WSL / MSYS2 / Cygwin / PowerShell7

Fluent Terminal / Windows Terminal

WSL 配置 zsh

wsl 下 git clone 报错:GnuTLS recv error (-110): The TLS connection was non-properly terminated.

安装 zsh

apt install -y zsh

安装 oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# 如果无法安装,使用下面这种方式
sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh@master/tools/install.sh)"

配置插件

插件列表 https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins

zsh-syntax-highlighting
zsh-autosuggestions
zsh-proxy

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

# 安装 zsh-autosuggestions 插件
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/sukkaw/zsh-proxy.git ~/.oh-my-zsh/custom/plugins/zsh-proxy

# 安装 zsh-proxy 插件
git clone https://github.com/sukkaw/zsh-proxy.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-proxy

修改 ~/.zshrc,在 plugins 中添加 zsh-syntax-highlighting

# 编辑 ~/.zshrc
vim ~/.zshrc

# 在 plugins 后括号里添加安装的插件名字
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)

# 刷新下配置
source ~/.zshrc

zsh-proxy

主题

主题列表

推荐两款主题

pure主题
agnoster

PowerShell 7+ 配置 oh-my-posh & posh-git

https://zhuanlan.zhihu.com/p/137595941
https://zhuanlan.zhihu.com/p/137251716

安装 Fira Code 字体

Fira Code