I recently moved from GNU screen to tmux.
I find it quite similar but with bigger support (I switched due to problem with escape-time in neovim- resolution was only for tmux).
Unfortunately in tmux I'm unable to find a similar command to this:
screen -X eval "chdir $(some_dir)"
The command above changed the default directory for new window/screen/pane from within the GNU screen so when I pressed Ctrl+a (similar to tmux Ctrl+b)- new window opened in the $(some_dir)
directory.
Is there a similar thing in tmux?
ANSWER:
I have used @Lqueryvg answer and combined it with @Vincent Nivoliers suggestion froma a comment and that gave me a new binding for a command attach -c "#{pane_current_path}"
which sets my current directory as a default one.
Thanks.
new-window -c "#{pane_current_path}"
is working but what I need is to set the path permanently, i.e.: I'm working in a project in /aaa/bbb but somehow I when I change path to say /ccc/ddd and start new with C-b and c I want to land one more time in /aaa/bbb. Can you think of a solution to this? – lewiatan Mar 08 '16 at 13:41.tmux.conf
. That way I only have to navigate once to the folder and then create my windows / split from there, but I admit this is not a solution to your problem, that's why I didn't post an answer ! – Vincent Nivoliers Mar 08 '16 at 13:52attach -c "#{pane_current_path}"
into Lqueryvg's answer? I almost missed your comment down there and definitely your edit up here ^^' – nuala Aug 28 '20 at 23:41