Answers:
尝试将以下内容添加到您的〜/ .tmux.conf文件中。
# Turn on window titles
set -g set-titles on
# Set window title string
# #H Hostname of local host
# #I Current window index
# #P Current pane index
# #S Session name
# #T Current window title
# #W Current window name
# # A literal ‘#’
set -g set-titles-string '#S:#I.#P #W'
# Automatically set window title
setw -g automatic-rename
set -g set-titles on
。然后,您可以根据需要自定义set-titles-string
。