将tmux pane title设置为与split-window一起使用的命令

问题描述 投票:0回答:1

Question

是否有可能将<command>new-session给出的split-window发送到窗格标题?

背景

tmux command

tmux \
  new-session -s start  \
    "lerna bootstrap; read" \; \
  split-window -c "#{pane_current_path}" \
    "yarn api:setup; read" \; \
  split-window -c "#{pane_current_path}" \
    "yarn api:start; read" \; \
  split-window -c "#{pane_current_path}" \
    "yarn spa:start; read" \; \
  split-window -c "#{pane_current_path}" \
    "yarn spa:deps:build; read" \; \
  select-layout even-vertical

~/.tmux.conf

set -g pane-border-format "#P: #{pane_current_command}"

窗格标题

Current

──0: bash─────────────────────

──1: bash─────────────────────

──2: bash─────────────────────

Desired

──0: lerna bootstrap; read─────────────────────

──1: yarn api:setup; read─────────────────────

──2: yarn api:start; read─────────────────────

等等

bash macos tmux
1个回答
2
投票

您可以使用#{pane_start_command}但显然不会随着运行命令的更改而更新。

© www.soinside.com 2019 - 2024. All rights reserved.