如何让 tmux 提示我显示状态左文本? [英] How to have tmux prompt me for the status-left text to display?

查看:31
本文介绍了如何让 tmux 提示我显示状态左文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将状态栏左消息更改为我键入的任何内容.
就像当我按 Ctrl+B F 时我在状态栏中有这个提示:

I want to change status bar left message to anything I type.
Just like when I press Ctrl+B F I have this prompt in status bar :

(find-window)

我想按下,说 Ctrl+B E 并有如下提示:

I'd like to press, say Ctrl+B E and have a prompt like :

(status-left)

然后在 Enter 上,我输入的文本将分配给 status-left.

Then on Enter the text I've typed would be assigned to status-left.

不想想要调用一个 shell 脚本来在 shell 窗口中打印提示并打印输入的值(这是否可能?),我希望提示发生在状态栏本身.

I DON'T want to have to call a shell script that would print the prompt in the shell window and print entered value (is that even possible?), I want the prompt to happen in the status bar itself.

我应该怎么做?如果我输入我的 .tmux.conf :

How should I go with that? If i put in my .tmux.conf :

unbind e
bin e set status-left

当我按下 Ctrl+B E

推荐答案

command-prompt 可能就是您要找的.

command-prompt is probably what you are looking for.

bind-key S command-prompt -p "New Status: " "set -g status-left '%1'"

这篇关于如何让 tmux 提示我显示状态左文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆