【问题标题】:Displaying current path in the window title with byobu on centos在centos上使用byobu在窗口标题中显示当前路径
【发布时间】:2015-06-29 15:58:15
【问题描述】:

当使用 rxvt 时,我习惯于在 linux 终端窗口标题中显示我当前的路径:

PS1="\[\033]0;\u@\h: \w\007\][${LOGNAME}@${HOSTNAME}] > "

来自我的 .bashrc

我在 centos 上的 byobu(使用 tmux)中找不到这样做的方法。有没有人知道如何做到这一点,或者在 byobu 状态行?

谢谢

【问题讨论】:

    标签: centos tmux byobu


    【解决方案1】:

    我已经在 byobu 状态栏中找到了方法。

    CentOS 6 的问题在于来自标准 repo 的 tmux 版本。是v1.6,我们至少需要1.8才能达到效果。

    所以从这里解释的最新来源安装 tmux:https://gist.github.com/sturadnidge/4185338

    注意:在再次运行 byobu 之前终止旧的 tmux 会话。

    然后在您的 $HOME/.byobu/.tmux.conf 中使用以下设置

    set -g status-left '#{pane_current_path} '
    

    【讨论】:

      猜你喜欢
      • 2011-01-18
      • 1970-01-01
      • 2021-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-22
      • 1970-01-01
      • 2013-06-26
      相关资源
      最近更新 更多