英文:
How to select a tmux window by name?
问题
I have several windows including r-emr_task
, r-emr_task_bake
and r-emr_task_fry
:
$ tmux list-windows | grep r-emr_task
0: r-emr_task (1 panes) [94x22] [layout 5685,94x22,0,0,54] @54
32: r-emr_task_fry (1 panes) [142x32] [layout 5976,142x32,0,0,55] @55
41: r-emr_task (1 panes) [142x32] [layout d971,142x32,0,0,41] @41
43: r-emr_task_bake (1 panes) [142x32] [layout d973,142x32,0,0,43] @43
45: r-emr_task_fry (1 panes) [142x32] [layout d975,142x32,0,0,45] @45
56: r-emr_task_bake (1 panes) [142x32] [layout d975,142x32,0,0,64] @64
$
If I try to switch to the r-emr_task
window by using the '
command, and then entering r-emr_task
, I get the error: Can't find window: r-emr_task
.
So what I end up doing is using the "
command and the /r-emr_task
to search for the window and press ENTER to select it.
Why doesn't the '
command work? The tmux man page says:
' Prompt for a window index to select.
I've also tried '
followed by =r-emr_task
to select exactly that window. I also tried =0:r-emr_task
to include the session name. No go.
英文:
I have several windows including r-emr_task
, r-emr_task_bake
and r-emr_task_fry
:
$ tmux list-windows | grep r-emr_task
0: r-emr_task (1 panes) [94x22] [layout 5685,94x22,0,0,54] @54
32: r-emr_task_fry (1 panes) [142x32] [layout 5976,142x32,0,0,55] @55
41: r-emr_task (1 panes) [142x32] [layout d971,142x32,0,0,41] @41
43: r-emr_task_bake (1 panes) [142x32] [layout d973,142x32,0,0,43] @43
45: r-emr_task_fry (1 panes) [142x32] [layout d975,142x32,0,0,45] @45
56: r-emr_task_bake (1 panes) [142x32] [layout d975,142x32,0,0,64] @64
$
If I try to switch to the r-emr_task
window by using the '
command, and then entering r-emr_task
, I get the error: Can't find window: r-emr_task
.
So what I end up doing is using the "
command and the /r-emr_task
to search for the window and press ENTER to select it.
Why doesn't the '
command work? The tmux man page says:
> ' Prompt for a window index to select.
I've also tried '
followed by =r-emr_task
to select exactly that window. I also tried =0:r-emr_task
to include the session name. No go.
答案1
得分: 1
因为您有两个具有相同名称“r-emr_task”的窗口。C-b '
期望“索引”只匹配一个窗口。
0: r-emr_task (1 panes) [94x22] [layout 5685,94x22,0,0,54] @54
41: r-emr_task (1 panes) [142x32] [layout d971,142x32,0,0,41] @41
英文:
It's because you have two windows with the same name r-emr_task
. C-b '
expects that the "index" matches only one window.
0: r-emr_task (1 panes) [94x22] [layout 5685,94x22,0,0,54] @54
41: r-emr_task (1 panes) [142x32] [layout d971,142x32,0,0,41] @41
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论