将多个命令绑定到屏幕中的单个键?
如何将多个命令绑定到 gnu-screen 中的一个键?我想将两个映射合并
bind c copy
bind b eval "writebuf" "exec sh -c 'xsel --clipboard < /tmp/screen-exchange'"
为一个一键映射。这怎么能做到呢?
有谁知道有关 gnu-screen 高级配置/脚本编写内容的好教程吗?
提前致谢, 克里斯
how can i bind more than one command to a single key in gnu-screen? I want to combine the two mappings
bind c copy
bind b eval "writebuf" "exec sh -c 'xsel --clipboard < /tmp/screen-exchange'"
to a single one-key mapping. How can this be done?
Does anyone know a good tutorial on this advanced configuration/scripting stuff for gnu-screen?
Thanks in advance,
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将每个命令作为单独的参数传递给
eval
,例如eval "echo foo" "echo bar"
。在您给定的场景中,我认为只需在eval
之后添加copy
即可满足您的要求。Pass each command as a separate argument to
eval
, e.g.,eval "echo foo" "echo bar"
. In your given scenario, I would think that just addingcopy
aftereval
would do what you want.例如,我使用
在两个垂直分割窗口之间切换并调整大小,同时将聚焦窗口调整为 130 列(按“
CA #
”)。因此,使用“
eval
”连接多个命令似乎可以正常工作。I use
for example to switch between two vertical split windows and resize, at the same time, the focused window to 130 columns (pressing "
C-A #
").So, the concatenation of multiple commands with '
eval
' seems to work properly.