An invalid escape sequence error is generated.
生成了一个无效的转义序列错误。
The usual escape sequence is "ESC-[31m", where the "1" specifies the foreground color, and can be any digit from 0 (default) to 9.
通常的换码序列是 "ESC-[31m",其中 "1" 指定前景颜色,可以是任何从 0(缺省)到 9 的任何数字。
Another point to be aware of is the need to tell Zsh which characters form escape sequence in a prompt, otherwise it will assume they are all printable characters, and position the cursor incorrectly.
另一个需要注意的是需要告诉 Zsh 在提示符中哪些字符构成换码序列,否则就会假设它们都是可打印字符,光标的位置就会出错。
应用推荐