使用 Win10 和WSL2 ubuntu 20.04和Powerline10k的各种终端。
\n使用 python 模块rich测试颜色输出。
\n\n正如 Powershell 清楚地显示的那样,Windows 终端可以输出真彩色。\n但是很奇怪,在 WSL2 上,无论我尝试过 win10 上的哪个终端,zsh 都无法打印真彩色。
\n$TERM正确报告 xterm-256color。
\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)\nRun Code Online (Sandbox Code Playgroud)\n并且没有 env $COLORTERM。
由于到目前为止我无法通过谷歌搜索找到任何修复程序,我假设这可能与 zsh 有关?
\n这是自动生成的.zshrc文件:
\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)