Tmux 新視窗預設名稱

Tmux 新視窗預設名稱

我在 Fedora 20 上使用 tmux(我使用 yum 安裝了預設的 tmux rpm)。當我在 tmux 中建立一個新視窗時,預設標題是這樣的:

user@hoest:/path/to/this/folder

這是很長而且很煩人的改變。我找到了一些潛在的解決方案這裡,但它們似乎都不適合我的情況。關於如何解決這個問題有任何提示嗎?

這是我的~/.tmux.conf

unbind C-b
set -g prefix C-a
bind a send-prefix
set -g default-terminal "screen-256color"
set -g base-index 1
set -g pane-base-index 1
bind-key c new-window -n "default"
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
set-window-option -g window-status-current-bg red
set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 4-)'
setw -g mode-mouse on
set-option -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
set -g history-limit 100000
set-option -g default-shell /usr/bin/bash
set -sg escape-time 1

答案1

我在 Fedora 20 上遇到了同樣的問題PROMPT_COMMANDhttps://bugzilla.redhat.com/show_bug.cgi?id=969429

這是我正在使用的解決方法:

sudo ln -s /usr/bin/true /etc/sysconfig/bash-prompt-screen

這將防止在使用 screen 或 tmux 時/etc/bashrc設定PROMPT_COMMAND將視窗標題設為非常長的值的環境變數。

相關內容