Answers:
您正在“标记”窗格:
-m和-M用于设置和清除标记的窗格。一次只有一个标记窗格,设置一个新的标记窗格将清除最后一个。标记的窗格是-s连接窗格,交换窗格和交换窗口的默认目标。
现在,默认情况下,某些操作将以标记的窗格为目标。这是一个示例bash脚本进行测试。您可以在tmux会话中执行此脚本。
# /usr/bin/env bash
set -euo pipefail
# Make three vertically split windows with text in each.
tmux split-window -v
tmux split-window -v
tmux select-layout even-vertical
tmux send-keys -t 0 'echo pane zero' C-m
tmux send-keys -t 1 'echo pane one' C-m
tmux send-keys -t 2 'echo pane two' C-m
# You can now swap the current pane with an explicitly targeted pane. Here, we
# change pane ordering from 0-1-2 to 1-0-2, and back again.
tmux select-pane -t 0
tmux swap-pane -t 1
tmux swap-pane -t 1
# You can also swap panes by "marking" one and letting the target of the swap be
# implicit. Here, we change ordering from 0-1-2 to 1-0-2, and back again.
tmux select-pane -t 0
tmux select-pane -t 1 -m
tmux swap-pane
tmux swap-pane
有关更多信息,请参见tmux(1)。