默认情况下,它仅匹配“关键字”字符序列(数字、字母和下划线),除了与光标左边进行匹配之外,它对上下文没有深刻的理解。
By default, it matches only sequences of "keyword" characters (alphanumerics and underscore), and it has no deep sense of context beyond matching what's immediately to the left of the cursor.
如果你在ESC字符后跟一个大写的A,光标将向右移动一位。
And if you followed that by a capital a the cursor would be seen to move one position to the right.
另一个需要注意的是需要告诉 Zsh 在提示符中哪些字符构成换码序列,否则就会假设它们都是可打印字符,光标的位置就会出错。
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.
应用推荐