Tmux 2.0 “pane_current_path” not working on CentOS

tmux

Tmux 2.0 on my CentOS always goes to the home directory when creating new pane or window. I have added these lines in .tmux.conf but still not working after restarting tmux:

bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"

Another similar problem is that I use tmux-resurrect to restore saved session, and all restarted panes go to home.

Best Answer

According to this Q&A, you can replace #{pane_current_path} with $PWD. It works on my CentOS 7 with tmux 1.8.

Related Question