I want my window title bar to show my PWD. In my .bashrc
I have this which seems to do the trick for Bash:
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
However, when I use Tmux, the window shows the directory of wherever I launched Tmux, not the current directory I've navigated to within Tmux.
Below, I launched Tmux in ~
, then navigate to ~/Downloads
. The title bar still shows ~
. Behind it is a window where I navigate to ~/Downloads
using just Bash; it shows what I want:
Here are things I already tried that did not work: