add a link of winlinks to each window and a pointer to the session to
each winlink. Also rewrite the alerts processing to return to the old
behaviour (alert in any window sets the flag on any winlink).
around, we can't use file descriptors for the working directory because
we will be unable to pass it to a privileged process to tell it where to
read or write files or spawn children. So move tmux back to using
strings for the current working directory. We try to check it exists
with access() when it is set but ultimately fall back to ~ if it fails
at time of use (or / if that fails too).
multiple times, also remove the default space in window_flags and use a
conditional to add it in window-status-format (this means additional
flags can be added in the option without extra spaces). From Thomas Adam
with tweaks by me.
split-window, respawn-window or respawn-pane, pass them directly to
execvp() to help avoid quoting problems. One argument still goes to "sh
-c" like before. Requested by many over the years. Patch from J Raynor.
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
overridden.
- 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.
When calling 'movew -r' on a session to reorder the winlinks, ensure
when adding back in the information for the lastw stack that we look up
the winlink based on the window and not its index.
Using the index doesn't make sense here because when comparing it to the
old set, it will never match since the winlink has been renumbered.
Bug reported by Ben Boeckel. Patch by Thomas Adam.