On Sun, Oct 09, 2011 at 12:04:53PM +0200, Romain Francoise wrote:
> Josh Triplett <j...@joshtriplett.org> writes:
> > When creating a new terminal, I most frequently want it to start in the
> > same working directory as the current terminal.  gnome-terminal has this
> > feature, and I find it highly preferable to always starting new
> > terminals in my home directory.  Would you consider adding an option for
> > this?
> 
> The usual way to achieve this in tmux is to create the new window using
> 'tmux neww' (or 'tmux splitw') from the first shell. The tmux client will
> pass its working directory to the server, and the process in the new
> window/pane will be created there.

Good to know; I do find it handy that I can programmatically create new
tmux windows or panes from within tmux.  However, I tend to frequently
create windows via keystrokes, and I'd like to get the same behavior
there as well.

> The working directory for windows created using keys is taken from the
> 'default-path' option. I guess a special value 'inherit' could be added to
> get the same behavior, but getting the current working directory of a
> given process "from the outside" is non-portable (it involves /proc in
> Linux).

True; as far as I know gnome-terminal does get the current working
directory using such a mechanism.  I'd be greatly appreciative if tmux
would consider doing the same; I did find default-path when I searched,
and an "inherit" value would work perfectly for me.

As an alternative, if tmux allowed escape sequences in default-path, and
if tmux exposed the PID of the current terminal's child process as one
of the escape sequences, I could manually do the "readlink
/proc/$pid/cwd" myself. :)  (Though I'd certainly prefer not to add one
more forked command to the startup of each shell.)

- Josh Triplett



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to