Hello,

I am trying to migrate from screen to tmux but I find its "current 
directory" behavior to be quite irritating.  It actually makes tmux 
painful to use in my situation.

My use case: I have a bunch of per-project directories in 
~/os/<project>/.  When I want to work on a project, I go into ~/os/foo 
and start a screen session named "foo".  I do this for several projects 
at a time so I end up having multiple screen sessions.  Each session has 
the name of the project it refers to and its current directory is that 
of the project.  As a result, creating new windows inside each session 
does the right thing of opening a new shell within the root directory of 
the corresponding project.

Now... as you know: in tmux, the current directory for all new windows 
is set to the directory in which tmux was first started.  Starting a new 
session when the tmux server is also running has the "funny" effect of 
correctly creating a new window in the current directory, but any new 
windows created for that session get the directory of the server.  There 
is no "per-session current directory" concept.  This, in my opinion, is 
really confusing.

What's the rationale behind the current design?

Could tmux (optionally?) keep the same behavior of screen (that is, to 
maintain a "current directory" per-session)?

Thanks!

PS: I see that this issue was also raised in the "Current directory in 
new windows/sessions" thread of 2/9/10.  I also see that I could 
probably achieve something *similar* to what I need by doing some PS1 
black voodoo (according to the FAQ)... but it's not something that I 
really fancy.  (And I don't think that such approach is guaranteed to 
work in non-bash shells.)


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to