Artificial intelligent assistant

tmux status-bar #(pwd) doesn't reload I have a problem with the tmux 2.1 status bar. As the manual explains I'd write in ~/.tmux.conf it: set -g status-right "#(/bin/pwd) %R %d/%m/%g" set -g status-interval 1 After I start tmux in status bar is /home/conformist. But if I change cwd (like cd /) — status bar is still $HOME. Everything works perfect if I change conf to: set -g status-right "#{pane_current_path} %R %d/%m/%g" I'd like to look in status bar $HOME like ~ and cannot do this, because pwd doesn't change (and pwd | perl -pne s-$HOME-~- doesn't work too).

Calling `/bin/pwd` like that will not work because the program is run by the same process (it is **not** your shell). If you are using `bash`, you can modify your prompt to send an escape sequence to `tmux` to change the window name using the escape sequence shown as an example:


printf '\033kWINDOW_NAME\033\\'


Here is a separate shell script to demonstrate the escape sequence:


#!/bin/sh
printf '\033k%s\033\\' $(pwd)


It is not the same escape sequence used for xterm titles, but you can apply the advice in the Bash Prompt HOWTO in the same way.

Further reading:

* Bash Prompt HOWTO

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a9527efc8922557ae295361053cd8580