在 Cygwin 1.7 中将 Zsh 作为 shell 启动时,我以纯文本形式获得转义字符。使用带有 -l 选项的 Zsh 时,此问题已解决。为什么是这样?
如您所见,终端正确呈现 Bash 提示,但 Zsh 提示不会将提示呈现为 ANSI 转义序列。
windows terminal cygwin zsh
cygwin ×1
terminal ×1
windows ×1
zsh ×1