我今天刚刚开始使用ZSH和Cygwin / rxvt(以及默认安装的oh-my-zsh),我注意到反向历史搜索有一点点怪癖,这让我很烦恼。 搜索功能正常,但进入搜索会使光标缩进一点:
{underlined} mkdir blah {/ underlined}">
它本身并不是真的有问题,但如果我执行命令,它将保持缩进。 此外,如果我取消搜索,光标将保持缩进:
{blank} {cursor}">
如果必须的话,我可以忍受这个,但我想知道是否有人知道是什么原因造成的? 鉴于所涉及的变量数量(Cygwin,rxvt,zsh,oh-my-zsh等),以及我对zsh的新概率,我不知道从哪里开始。
I've just started using ZSH with Cygwin/rxvt today (along with a default install of oh-my-zsh), and I'm noticing the reverse history search has a little quirk which is bothering me quite a bit. The search functionality works fine, but entering the search indents the cursor a bit:
{underlined}mkdir blah{/underlined}">
This on it's own isn't really problematic, but if I execute the command, it will remain indented there. In addition, if I cancel out of the search, the cursor remains indented afterward:
{blank}{cursor}">
I can live with this if I must, but I wonder if anyone knows what could be causing this? Given the number of variables involved (Cygwin, rxvt, zsh, oh-my-zsh, etc.), and how new I am to zsh in general, I'm not sure where to start.
最满意答案
它看起来非常像这里或这里的问题:你为你的提示添加了颜色,但忘了告诉zsh这些序列没有宽度。
It looks very much like the issue here or here: you added colors to your prompt but forgot to tell zsh that these sequences have no width.
更多推荐
发布评论