OpenBSD CVS

CVS log for src/usr.bin/tmux/session.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.96 / (download) - annotate - [select for diffs], Sat Sep 2 08:38:37 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.95: +4 -2 lines
Diff to previous 1.95 (colored)

Set visited flag on last windows when linking session.

Revision 1.95 / (download) - annotate - [select for diffs], Fri Sep 1 13:48:54 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.94: +3 -5 lines
Diff to previous 1.94 (colored)

Add detach-on-destroy previous and next, mostly from Alexis Hildebrandt.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Jul 19 13:03:36 2023 UTC (10 months ago) by nicm
Branch: MAIN
Changes since 1.93: +5 -2 lines
Diff to previous 1.93 (colored)

Correct visited flag when the last window list is rebuilt by renumbering
windows, appears to fix hang reported by Mark Kelly.

Revision 1.93 / (download) - annotate - [select for diffs], Mon Oct 17 10:59:42 2022 UTC (19 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.92: +9 -2 lines
Diff to previous 1.92 (colored)

Preserve marked pane when renumbering windows.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Feb 22 13:31:18 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.91: +3 -2 lines
Diff to previous 1.91 (colored)

Do not attempt to update focus (and crash) when there is no previous window.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Feb 22 11:10:41 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

Add next_session_id format with the next session ID, GitHub issue 3078.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Sep 17 07:20:49 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.89: +4 -1 lines
Diff to previous 1.89 (colored)

Do not destroy sessions twice, GitHub issue 2889.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Aug 13 06:52:51 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.88: +7 -1 lines
Diff to previous 1.88 (colored)

Change focus to be driven by events rather than walking all panes at end
of event loop, this way the ordering of in and out can be enforced.
GitHub issue 2808.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Jul 6 08:18:38 2021 UTC (2 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.87: +3 -1 lines
Diff to previous 1.87 (colored)

Forbid empty session names, GitHub issue 2758.

Revision 1.87 / (download) - annotate - [select for diffs], Sat May 16 14:49:50 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.86: +15 -6 lines
Diff to previous 1.86 (colored)

Instead of forbidding invalid session names, sanitize them like window
names.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Dec 26 11:04:58 2019 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.85: +15 -2 lines
Diff to previous 1.85 (colored)

Add a number of new formats to inspect what sessions and clients a
window is present or active in. From Tyler Culp in GitHub issue 2034.

Revision 1.85 / (download) - annotate - [select for diffs], Fri Apr 26 11:38:51 2019 UTC (5 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.84: +1 -4 lines
Diff to previous 1.84 (colored)

Merge hooks into options and make each one an array option. This allows
multiple commands to be easily bound to one hook. set-hook and
show-hooks remain but they are now variants of set-option and
show-options. show-options now has a -H flag to show hooks (by default
they are not shown).

Revision 1.84 / (download) - annotate - [select for diffs], Wed Apr 17 14:37:48 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.83: +8 -62 lines
Diff to previous 1.83 (colored)

Break new window and pane creation common code from various commands and
window.c into a separate file spawn.c.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Mar 16 17:14:07 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

Tidy and rename some bits of status line code.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Oct 18 08:38:01 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.81: +8 -9 lines
Diff to previous 1.81 (colored)

Support for windows larger than visible on the attached client. This has
been a limitation for a long time.

There are two new options, window-size and default-size, and a new
command, resize-window. The force-width and force-height options and the
session_width and session_height formats have been removed.

The new window-size option tells tmux how to work out the size of
windows: largest means it picks the size of the largest session,
smallest the smallest session (similar to the old behaviour) and manual
means that it does not automatically resize windows. The default is
currently largest but this may change. aggressive-resize modifies the
choice of session for largest and smallest as it did before.

If a window is in a session attached to a client that is too small, only
part of the window is shown. tmux attempts to keep the cursor visible,
so the part of the window displayed is changed as the cursor moves (with
a small delay, to try and avoid excess redrawing when applications
redraw status lines or similar that are not currently visible). The
offset of the visible portion of the window is shown in status-right.

Drawing windows which are larger than the client is not as efficient as
those which fit, particularly when the cursor moves, so it is
recommended to avoid using this on slow machines or networks (set
window-size to smallest or manual).

The resize-window command can be used to resize a window manually. If it
is used, the window-size option is automatically set to manual for the
window (undo this with "setw -u window-size"). resize-window works in a
similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and
-A flags. -a sets the window to the size of the smallest client (what it
would be if window-size was smallest) and -A the largest.

For the same behaviour as force-width or force-height, use resize-window
-x or -y, and "setw -u window-size" to revert to automatic sizing..

If the global window-size option is set to manual, the default-size
option is used for new windows. If -x or -y is used with new-session,
that sets the default-size option for the new session.

The maximum size of a window is 10000x10000. But expect applications to
complain and much higher memory use if making a window excessively
big. The minimum size is the size required for the current layout
including borders.

The refresh-client command can be used to pan around a window, -U -D -L
-R moves up, down, left or right and -c returns to automatic cursor
tracking. The position is reset when the current window is changed.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Aug 18 20:08:52 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Aug 2 11:56:12 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.79: +5 -7 lines
Diff to previous 1.79 (colored)

session_groups can be static also.

Revision 1.79 / (download) - annotate - [select for diffs], Fri May 4 08:21:42 2018 UTC (6 years ago) by nicm
Branch: MAIN
Changes since 1.78: +5 -4 lines
Diff to previous 1.78 (colored)

Improve logging of sessions.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Nov 2 18:27:35 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.77: +2 -6 lines
Diff to previous 1.77 (colored)

Only show the first member of session groups in tree mode (-G flag
disables).

Revision 1.77 / (download) - annotate - [select for diffs], Sun Jul 9 22:33:09 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.76: +5 -5 lines
Diff to previous 1.76 (colored)

Some extra logging to show why tmux might exit.

Revision 1.76 / (download) - annotate - [select for diffs], Thu May 4 07:16:43 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.75: +2 -1 lines
Diff to previous 1.75 (colored)

Some new notifications, mainly for active pane and current window and
session:

    pane-mode-changed
    window-pane-changed
    client-session-changed
    session-window-changed

From Joshua Brot.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Apr 28 19:13:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.74: +13 -5 lines
Diff to previous 1.74 (colored)

Log what is happening with window and session reference counts much more
obviously.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Apr 25 15:35:10 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

Do not update TERM into config file parsing has finished.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Mar 9 17:02:38 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.72: +3 -7 lines
Diff to previous 1.72 (colored)

Move server_fill_environ into environ.c and move some other common code
into it.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Feb 9 15:04:53 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.71: +54 -41 lines
Diff to previous 1.71 (colored)

Instead of numbering session groups, give them a name which may be given
to -t instead of a target session. Also allow them to contain only one
session.

Revision 1.71 / (download) - annotate - [select for diffs], Fri Feb 3 21:01:02 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.70: +3 -1 lines
Diff to previous 1.70 (colored)

Cache status line position to reduce option lookups during output.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Oct 19 09:22:07 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.69: +7 -3 lines
Diff to previous 1.69 (colored)

Alerts are too slow, so rather than walking all sessions and windows,
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).

Revision 1.69 / (download) - annotate - [select for diffs], Wed Oct 19 08:17:11 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.68: +1 -2 lines
Diff to previous 1.68 (colored)

Move session-create hook out of session_create so it works with grouped sessions.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Oct 16 22:06:40 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.67: +9 -9 lines
Diff to previous 1.67 (colored)

Use the notify name string instead of going via an enum and change
existing hooks to use notifys instead.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Oct 15 09:27:52 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

Give window_create and window_create1 better names.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Oct 15 00:12:58 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.65: +6 -2 lines
Diff to previous 1.65 (colored)

Rename a function for consistency and some spacing nits.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Oct 13 21:37:03 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.64: +1 -4 lines
Diff to previous 1.64 (colored)

Remove the set-remain-on-exit option, it was always a hack and can now
be done with hooks instead.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Oct 11 13:21:59 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.63: +8 -4 lines
Diff to previous 1.63 (colored)

Add static in window-*.c and move some internal functions out of tmux.h.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.62: +12 -12 lines
Diff to previous 1.62 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Dec 8 01:10:31 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.60: +5 -1 lines
Diff to previous 1.60 (colored)

Add hooks infrastructure, basic commands (set-hook, show-hooks) and a
couple of not very useful client hooks. This will eventually let
commands be run at various points and on notifications. Joint work with
Thomas Adam.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

Use __unused rather than rolling our own.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Nov 18 09:22:29 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.58: +7 -5 lines
Diff to previous 1.58 (colored)

Don't update activity time twice for new sessions, and add some logging.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Oct 31 08:13:58 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.57: +6 -6 lines
Diff to previous 1.57 (colored)

Because pledge(2) does not allow us to pass directory file descriptors
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).

Revision 1.57 / (download) - annotate - [select for diffs], Wed Oct 28 09:51:55 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.56: +12 -12 lines
Diff to previous 1.56 (colored)

Like options, move the environ struct into environ.c.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Oct 27 15:58:42 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.55: +11 -10 lines
Diff to previous 1.55 (colored)

Move struct options into options.c.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Sep 1 18:50:16 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Fix a spelling error, sesson -> session.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Aug 29 08:30:54 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.53: +2 -1 lines
Diff to previous 1.53 (colored)

Move alerts onto events rather than checking every loop.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Aug 28 13:16:03 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.52: +4 -2 lines
Diff to previous 1.52 (colored)

Don't leak name when freeing session, from Kuang-che Wu.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 28 13:12:20 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.51: +40 -2 lines
Diff to previous 1.51 (colored)

Per-session timers for locking, and remove the global one-second timer.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Aug 28 13:01:03 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.50: +14 -9 lines
Diff to previous 1.50 (colored)

Make session_update_activity more useful and use it in more places.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jun 5 18:18:32 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.49: +28 -5 lines
Diff to previous 1.49 (colored)

Similarly, for sessions use a callback to free rather than checking
every loop.

Revision 1.49 / (download) - annotate - [select for diffs], Wed May 6 08:35:39 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.48: +15 -1 lines
Diff to previous 1.48 (colored)

Add a format window_linked which is 1 if a window has been linked
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.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Apr 25 18:09:28 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.47: +17 -1 lines
Diff to previous 1.47 (colored)

Move the functions to convert ids from strings into session.c and window.c.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Apr 22 15:32:33 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored)

Make session_has return a flag, returning the first winlink found is a
recipe for errors.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Oct 22 23:18:53 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Fix some spacing nits.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Oct 22 23:11:41 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.44: +17 -3 lines
Diff to previous 1.44 (colored)

Merge unlink-window into kill-window.

Revision 1.44 / (download) - annotate - [select for diffs], Tue May 13 08:08:32 2014 UTC (10 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.43: +11 -9 lines
Diff to previous 1.43 (colored)

If multiple arguments are given to new-session, new-window,
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.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Apr 17 13:02:59 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.42: +9 -8 lines
Diff to previous 1.42 (colored)

Set PATH explicitly, either from client or session
environment. Previously it came from the session environment. From J
Raynor.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jan 22 14:00:08 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Do not permit periods in session names (colons are already banned). From
J Raynor.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Oct 10 12:26:36 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.40: +9 -10 lines
Diff to previous 1.40 (colored)

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
  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.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 10 11:58:24 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

Renumber windows: Lookup lastw via window not index

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.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Oct 10 11:46:29 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

Grouped sessions were being leaked on destroy, correctly free them.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Mar 25 10:11:45 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.37: +8 -8 lines
Diff to previous 1.37 (colored)

Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Mar 22 16:00:26 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.36: +16 -24 lines
Diff to previous 1.36 (colored)

Add session_set_current helper function, extracted from a diff from
Aaron Jensen.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.35: +5 -7 lines
Diff to previous 1.35 (colored)

xfree is not particularly helpful, remove it. From Thomas Adam.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Jul 8 07:27:32 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored)

Clear flags across all sessions, from Thomas Adam.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Apr 29 17:20:01 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.33: +47 -1 lines
Diff to previous 1.33 (colored)

Add a flag to move-window to renumber the windows in a session (closing
any gaps) and add an option to do this automatically each time a window
is killed. From Thomas Adam.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Mar 17 22:35:09 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.32: +15 -3 lines
Diff to previous 1.32 (colored)

Add notify hooks for various events, the functions are currently empty
stubs but will be filled in for control mode later. From George Nachman.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Aug 16 09:36:23 2011 UTC (12 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.31: +12 -5 lines
Diff to previous 1.31 (colored)

Correctly skip existing numbers when generating the name for a new
session.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Apr 6 21:51:31 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.30: +8 -1 lines
Diff to previous 1.30 (colored)

Change so that an empty session name always means the current sessions
even if given with, for example, -t '', and explicitly forbid empty
session names and those containing a : when they are created.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jan 25 22:31:50 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.29: +18 -4 lines
Diff to previous 1.29 (colored)

Check if the index is in use and fail before creating the child process,
rather than leaving a stray child on failure.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jan 13 02:08:14 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Er, fix next and previous session functions to actually work, part 2.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jan 13 02:07:06 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.27: +7 -13 lines
Diff to previous 1.27 (colored)

Fix next and previous session functions to actually work.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jan 1 01:12:09 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.26: +10 -2 lines
Diff to previous 1.26 (colored)

Don't reset the activity timer for unattached sessions every second,
this screws up the choice of most-recently-used. Instead, break the time
update into a little function and do it when the session is attached.

Pointed out by joshe@.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 30 23:16:18 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.25: +1 -4 lines
Diff to previous 1.25 (colored)

Change from a per-session stack of buffers to one global stack which is
much more convenient and also simplifies lot of code. This renders
copy-buffer useless and makes buffer-limit now a server option.

By Tiago Cunha.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Dec 21 22:37:59 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.24: +49 -64 lines
Diff to previous 1.24 (colored)

Store sessions in an RB tree by name rather than a list, this is tidier
and allows them to easily be shown sorted in various lists
(list-sessions/choose-sessions).

Keep a session index which is used in a couple of places internally but
make it an ever-increasing number rather than filling in gaps with new
sessions.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Dec 20 01:28:18 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.23: +1 -2 lines
Diff to previous 1.23 (colored)

Fix another stray addition that was too early. Oops.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Dec 20 00:43:24 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored)

Undo a change to next/previous session that got mixed in prematurely.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 20 00:19:20 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.21: +5 -6 lines
Diff to previous 1.21 (colored)

Dead sessions are never on the active sessions list, so the SESSION_DEAD
flag is effectively unused. Remove it.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Dec 20 00:03:55 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.20: +13 -1 lines
Diff to previous 1.20 (colored)

Unify the way sessions are used by callbacks - store the address and use
the reference count, then check it is still on the global sessions list
in the callback.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Sep 8 22:02:28 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.19: +43 -1 lines
Diff to previous 1.19 (colored)

Add -n and -p flags to switch-client to move to the next and previous
session (yes, it doesn't match window/pane, but so what, nor does
switch-client).

Based on a diff long ago from "edsouza".

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jun 27 02:56:59 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.18: +4 -1 lines
Diff to previous 1.18 (colored)

Store the current working directory in the session, change the default-path
option to default to empty and make that mean that the stored session CWD is
used.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jun 21 01:27:46 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.17: +23 -104 lines
Diff to previous 1.17 (colored)

Having a list of winlinks->alerts for each session is stupid, just store
the alert flags directly in the winlink itself.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 21 00:25:32 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.16: +13 -13 lines
Diff to previous 1.16 (colored)

Rename activity->alert in a couple of functions for consistency.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Dec 22 10:20:08 2009 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.15: +5 -5 lines
Diff to previous 1.15 (colored)

Fix a couple of problems with grouped sessions reported by danh: redraw
properly and choose the correct last window after a window is killed.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.14: +5 -5 lines
Diff to previous 1.14 (colored)

Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 13 14:47:31 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.12: +2 -3 lines
Diff to previous 1.12 (colored)

Use winlink_remove() to remove old winlinks when synchronizing grouped sessions
rather than doing it manually and not adjusted the reference count. Fixes
crash seen by Dan Harnett.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Nov 3 20:29:47 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Change session and client activity and creation time members to have more
meaningful names.

Also, remove the code to try and update the session activity time for the
command client when a command message is received as is pointless because it
des not have a session.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 10 10:02:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.10: +182 -9 lines
Diff to previous 1.10 (colored)

Add "grouped sessions" which have independent name, options, current window and
so on but where the linked windows are synchronized (ie creating, killing
windows and so on are mirrored between the sessions). A grouped session may be
created by passing -t to new-session.

Had this around for a while, tested by a couple of people.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Oct 10 09:46:11 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored)

Support for individual session idle time locking. May be enabled by turning off
the lock-server option (it is on by default). When this is off, each session
locks when it has been idle for the lock-after-time setting. When on, the
entire server locks when ALL sessions have been idle for their individual
lock-after-time settings.

This replaces one global-only option (lock-after-time) with another
(lock-server), but the default behaviour is usually preferable so there don't
seem to be many alternatives.

Diff/idea largely from Thomas Adam, tweaked by me.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Sep 20 14:58:12 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Regularise some fatal messages.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Sep 16 12:35:04 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.7: +11 -3 lines
Diff to previous 1.7 (colored)

Rather than constructing an entire termios struct from ttydefaults.h, just let
forkpty do it and then alter the bits that should be changed after fork. A
little neater and more portable.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 7 21:01:50 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.6: +17 -2 lines
Diff to previous 1.6 (colored)

Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Sep 1 13:09:49 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.5: +8 -2 lines
Diff to previous 1.5 (colored)

When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option.
This sets the shell invoked as a login shell when the default-command option is
empty.

The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell
or /bin/sh is valid first.

Based on a diff from martynas@, changed by me to be a session option rather
than a window option.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Aug 13 20:11:58 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.4: +5 -4 lines
Diff to previous 1.4 (colored)

Add a base-index session option to specify the first index checked when looking
for an index for a new window.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Aug 13 19:04:00 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.3: +6 -4 lines
Diff to previous 1.3 (colored)

When creating a new session from the command-line where there is an external
terminal, copy the termios(4) special characters and use them for new windows
created in the new session. Suggested by Theo.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Aug 8 21:52:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.2: +17 -7 lines
Diff to previous 1.2 (colored)

Infrastructure and commands to manage the environment for processes started
within tmux.

There is a global environment, copied from the external environment when the
server is started and each sesssion has an (initially empty) session
environment which overrides it.

New commands set-environment and show-environment manipulate or display the
environments.

A new session option, update-environment, is a space-separated list of
variables which are updated from the external environment into the session
environment every time a new session is created - the default is DISPLAY.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jul 7 19:49:19 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Rename the global options variables to be shorter and to make session options
clear. No functional change, getting this out of the way to make later options
changes easier.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6

Import tmux, a terminal multiplexor allowing (among other things) a single
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one terminal and moved to another.

ok deraadt pirofti

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.