Displaying current path in the window title with byobu on centos

て烟熏妆下的殇ゞ 提交于 2019-12-12 03:08:18

问题


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}] > "

from my .bashrc

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?

Thanks


回答1:


I've found out the way to do that in the byobu status bar.

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.

So install tmux from the latest sources like explained here: https://gist.github.com/sturadnidge/4185338

NB: Kill old tmux sessions before running byobu again.

And then use the following setting in your $HOME/.byobu/.tmux.conf

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


来源:https://stackoverflow.com/questions/29364982/displaying-current-path-in-the-window-title-with-byobu-on-centos

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!