1

I recently removed tmux 1.8 from Ubuntu 14.04, and compiled tmux 2.2 and installed it via make install. I need the newer tmux version for its true terminal color support. All other things seem to work fine, only hitting F2, Ctrl + F2 or Shift + F2 does not maintain the same present working directory. They all fall back to ~ (home dir). This is not what I want because I usually open new window or new split to do the things related to the directory at current window.

byobu -v
byobu version 5.74
tmux 2.2

How do I fix this?

1 Answer 1

2

Unfortunately, this behavior was changed in version 1.9 and seems like not going to get fixed. My request just left with no answer: https://github.com/tmux/tmux/issues/371

That means: the directory for all new processes will be the current server's dir. i.e. if you start tmux from your home dir, all new shells will start there as well.

Currently, the solution is to change all your key bindings for new-window and split-pane and add -c #{pane_current_path} to explicitly use the current pane's CWD as starting directory for the new one.

Another solution can be this. There's a mod of tmux (I'm the author) to add a proper scripting language to tmux to allow using aliases, binding multiple commands in 'mode', variables, loops, etc... And also, it brings back the that behavior: new windows and panes are opened in the current directory.

The sources are here: http://ershov.github.io/tmux/

You must log in to answer this question.

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