ZSH VI普通模式,以四处移动印刷文本

发布于 2025-02-13 07:55:06 字数 380 浏览 1 评论 0原文

我可以使用ZSH VI普通模式在先前的命令输出或外壳中的印刷文本中移动以复制/拉动它吗?

例如,在下面的屏幕截图中。我想移至ls的输出以复制某些东西。当我按j/k zsh循环时,我的命令历史记录,但不会移至印刷文本。 J/K仅在我当前写过但尚未执行的多行命令时,将一行down/up才。

Can I use zsh vi normal mode to move around previous commands output or the printed text in the shell to copy/yank it ?

For example in the screenshot below. I want to move to the output of ls to copy something. When I press j/k zsh cycle my command history but doesn't move up to the printed text. j/k move one line down/up only when I have multiple line command that I'm currently writing but haven't executed yet.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

_蜘蛛 2025-02-20 07:55:06

据我所知,交互方式访问命令的输出的能力是您的终端( - emulator)的域而不是壳的域。您将使用sedawkgrep,可能在管道中,访问,操纵和使用您所知道的输出的命令您感兴趣的部分。

要使用键盘快捷键/命令键访问输出-file In编辑。

To the best of my knowledge, the ability to access the output of commands interactively is the domain of your terminal (-emulator), not the shell. You would use commands like sed, awk, grep, possibly in a pipe, to access, manipulate and use output you know in advance is the part you are interested in.

To access the output with keyboard shortcuts/command-keys, I suggest using the like of tmux - it allows to copy/yank from the whole terminal display as if it was a text-file in an editor.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文