ZSH history

编程入门 行业动态 更新时间:2024-10-25 03:28:30
ZSH history-incremental-search-backward缩进游标(ZSH history-incremental-search-backward indents cursor)

我今天刚刚开始使用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.

更多推荐

本文发布于:2023-07-16 07:41:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1125512.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ZSH   history

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!