You are not logged in.

#1 2013-11-17 11:20:08

Registered: 2011-03-05
Posts: 67

tmux from git: preserve current working directory (RESOLVED)

I built tmux from git this evening, and now when creating a new window or
pane, the current directory is always set back to ~/ (before it would preserve
the directory from my current pane).  A little `git log --grep` found this

commit 282c5f9644ed262ee15efbd3d072f7acc577da15
Author: nicm <nicm>
Date:   Thu Oct 10 12:26:34 2013 +0000

    Alter how tmux handles the working directory to internally use file
    descriptors rather than strings.

    - Each session still has a current working directory.

    - New sessions still get their working directory from the client that
      created them or its attached session if any.

    - New windows are created by default in the session working directory.

    - The -c flag to new, neww, splitw allows the working directory to be

    - The -c flag to attach let's the session working directory be changed.

    - The default-path option has been removed.

    To get the equivalent to default-path '.', do:

            bind c neww -c $PWD

    To get the equivalent of default-path '~', do:

            bind c neww -c ~

    This also changes the client identify protocol to be a set of messages rather
    than one as well as some other changes that should make it easier to make
    backwards-compatible protocol changes in future.

Okay, fine.  So I edit my tmux.conf and add the line `bind c neww -c $PWD`,
close down all my tmux sessions, and start a new server, but my new windows
still point at ~/ no matter what.  Tried the same for other pane-splitting
commands, but no luck.

Anyone figure this out?  Or at least can anyone confirm I'm not being an
idiot?  I'll go file a bug report over there if so.  Thanks in advance.

*EDIT* -- mysteriously, there are two commits claiming the same thing.  The
other one has correct instructions in the message, which are:

bind c neww -c '#{pane_current_path}'

Last edited by wes (2013-11-19 06:11:27)


#2 2013-11-17 12:56:38

Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: tmux from git: preserve current working directory (RESOLVED)

You should probably ask upstream, since you're using unreleased code.


#3 2013-11-17 20:33:50

Registered: 2011-03-05
Posts: 67

Re: tmux from git: preserve current working directory (RESOLVED)

Yeah, I'll go check with them soon.  Thought perhaps since there exists a
tmux-git in the aur, I wouldn't be the only person around here playing
"git-roulette" with my computer.  : )


#4 2013-11-17 23:56:01

Forum Moderator
Registered: 2012-01-15
Posts: 3,699

Re: tmux from git: preserve current working directory (RESOLVED)

I'm curious -- is there a particular new feature you wanted from the git version, or are you just experimenting?

Last edited by 2ManyDogs (2013-11-17 23:56:12)


#5 2013-11-18 00:57:27

Registered: 2011-03-05
Posts: 67

Re: tmux from git: preserve current working directory (RESOLVED)

At the present moment, I don't think there are many big differences between
the arch version of tmux and what's in git (some bugs have been fixed, and
there has been some moderate refactoring).  But in the past, there have been a
number of nice features that I've had a little while before they would have
showed up here (e.g., the "zoom" feature).

Anyway, tmux is one of my favorite pieces of software, so I like keeping up to
date (browsing the git logs), and when an interesting feature comes through,
or when I just feel like mine has gotten kind of stale, I build a new one.
Sometimes to my detriment >_<


Board footer

Powered by FluxBB