小编jup*_*bjy的帖子

WSL2 上禁用 zsh 真彩色?

使用 Win10 和WSL2 ubuntu 20.04Powerline10k的各种终端。

\n

使用 python 模块rich测试颜色输出。

\n

\n

正如 Powershell 清楚地显示的那样,Windows 终端可以输出真彩色。\n但是很奇怪,在 WSL2 上,无论我尝试过 win10 上的哪个终端,zsh 都无法打印真彩色。

\n

$TERM正确报告 xterm-256color。

\n
\xe2\x9d\xaf env | grep TERM\nTERM=xterm-256color\n\n\xe2\x9d\xaf zsh --version\nzsh --version\nzsh 5.8 (x86_64-ubuntu-linux-gnu)\n
Run Code Online (Sandbox Code Playgroud)\n

并且没有 env $COLORTERM

\n

由于到目前为止我无法通过谷歌搜索找到任何修复程序,我假设这可能与 zsh 有关?

\n

这是自动生成的.zshrc文件:

\n
\xe2\x9d\xaf cat ~/.zshrc\n# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.\n# Initialization code that may require console input (password prompts, [y/n]\n# …
Run Code Online (Sandbox Code Playgroud)

colors zsh windows-subsystem-for-linux

5
推荐指数
1
解决办法
8004
查看次数

标签 统计

colors ×1

windows-subsystem-for-linux ×1

zsh ×1