问题描述
使用rxvt时,我习惯在linux终端窗口标题中显示当前路径:
I am used to displaying my current path in the linux terminal window title when using rxvt with something like:
PS1="\[\033]0;\u@\h: \w\007\][${LOGNAME}@${HOSTNAME}] > "
来自我的.bashrc
from my .bashrc
我找不到在centos上的byobu(使用tmux)中执行此操作的方法.有人在byobu状态栏中有关于如何执行此操作的线索吗?
I can't find a way to do that in byobu (with tmux) on centos. Does anyone have a clue on how to do that, or in the byobu status line?
谢谢
推荐答案
我在byobu状态栏中找到了解决方法.
I've found out the way to do that in the byobu status bar.
CentOS 6的问题是来自标准存储库的tmux版本.是v1.6,我们至少需要1.8才能达到结果.
The problem with CentOS 6, is that the tmux version that comes from the standard repo. is v1.6, and we need at least 1.8 to achieve the result.
因此,请从最新资源中安装tmux,如此处所述: https://gist.github.com/sturadnidge/4185338
So install tmux from the latest sources like explained here: https://gist.github.com/sturadnidge/4185338
NB:在再次运行byobu之前,请杀死旧的tmux会话.
NB: Kill old tmux sessions before running byobu again.
然后在$ HOME/.byobu/.tmux.conf中使用以下设置
And then use the following setting in your $HOME/.byobu/.tmux.conf
set -g status-left '#{pane_current_path} '
这篇关于在centos上使用byobu在窗口标题中显示当前路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!