5

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.

1 Answer 1

1

According to this Q&A, you can replace #{pane_current_path} with $PWD.

It works on my CentOS 7 with tmux 1.8.

NOTE: the Q&A link had no answer and tries to get folks to change browser settings. It's been removed.

3
  • I should confess that this is not a direct answer to your question. But my reputation is too low to let me post it as a comment.
    – xywang
    Oct 6, 2015 at 8:58
  • 3
    Still not working : (
    – Jon
    Oct 6, 2015 at 13:17
  • The Q&A link in the above answer doesn't link to relevant info. It actually goes to an insecure site (itsprite.com), which mucks with your browser's search settings.
    – emallove
    Jun 25, 2023 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .