我可以使 ZSH 的 Control-U 行为与 Bash 的行为相同吗?
在 Bash 中, Ctrl+u 会清除从光标到行首的文本,并将该文本放入粘贴缓冲区,可以使用 Ctrl 粘贴+y。
在Zsh中,它会清除文本,但不会将其放入缓冲区。
悲伤。
In Bash, Ctrl+u will clear from the cursor to the beginning of the line, and put that text into the paste buffer, which can be pasted with Ctrl+y.
In Zsh, it will clear the text, but does not put it into the buffer.
Sadness.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需两个
bindkey
命令即可轻松完成此操作:值得注意的是,至少应在默认 Emacs 键盘映射中绑定“^Y”。
This can be done really easily with just two
bindkey
commands:It may be worth noting that at least '^Y' should be bound in the default Emacs keymap.