OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.212 / (download) - annotate - [select for diffs], Wed May 15 09:59:12 2024 UTC (4 days, 2 hours ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.211: +19 -1 lines
Diff to previous 1.211 (colored)

Use default-shell for command prompt #() and popups as well

Revision 1.211 / (download) - annotate - [select for diffs], Mon Apr 17 18:00:19 2023 UTC (13 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.210: +2 -2 lines
Diff to previous 1.210 (colored)

It seems silly to use progname for version, just always say tmux.

Revision 1.210 / (download) - annotate - [select for diffs], Thu Nov 10 22:58:39 2022 UTC (18 months, 1 week ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.209: +2 -2 lines
Diff to previous 1.209 (colored)

- sort options; from josiah frentsos
ok nicm

- add -N to SYNOPSIS

- sort usage()

Revision 1.209 / (download) - annotate - [select for diffs], Mon Aug 23 11:04:21 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.208: +2 -1 lines
Diff to previous 1.208 (colored)

Fix a few memory leaks.

Revision 1.208 / (download) - annotate - [select for diffs], Tue Jul 6 08:26:00 2021 UTC (2 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.207: +11 -6 lines
Diff to previous 1.207 (colored)

Improve error reporting when the tmux /tmp directory cannot be created
or used, GitHub issue 2765 from Uwe Kleine-Koenig.

Revision 1.207 / (download) - annotate - [select for diffs], Thu Jun 10 07:52:29 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.206: +11 -6 lines
Diff to previous 1.206 (colored)

Do not expand the file given with -f so it can contain :s.

Revision 1.206 / (download) - annotate - [select for diffs], Mon Feb 22 11:42:50 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.205: +7 -7 lines
Diff to previous 1.205 (colored)

expand_paths needs the global environment to be set up, do that first.

Revision 1.205 / (download) - annotate - [select for diffs], Mon Feb 22 08:18:13 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.204: +26 -13 lines
Diff to previous 1.204 (colored)

Move config file path expansion much earlier, keep the list of paths
around rather than freeing later, and add a config_files format variable
containing it. Suggested by kn@ a while back.

Revision 1.204 / (download) - annotate - [select for diffs], Sun Jan 17 16:17:41 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.203: +6 -3 lines
Diff to previous 1.203 (colored)

Add -N flag to never start server even if command would normally do so,
GitHub issue 2523.

Revision 1.203 / (download) - annotate - [select for diffs], Tue Sep 22 05:23:34 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.202: +3 -3 lines
Diff to previous 1.202 (colored)

Fix warnings on some platforms with %llx and add a new message to handle
64-bit client flags.

Revision 1.202 / (download) - annotate - [select for diffs], Tue Jun 2 08:17:27 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.201: +15 -1 lines
Diff to previous 1.201 (colored)

Use CLOCK_MONOTONIC for timer measurement and add a timestamp to control
mode %output blocks.

Revision 1.201 / (download) - annotate - [select for diffs], Sat May 16 16:07:55 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.200: +8 -3 lines
Diff to previous 1.200 (colored)

Add a -D flag to ask tmux not to daemonize, useful both for running a
debugger (lldb does not have follow-fork-mode) and for running with a
managed supervisor init system. GitHub issue 2190.

Revision 1.200 / (download) - annotate - [select for diffs], Sat May 16 15:24:28 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.199: +2 -1 lines
Diff to previous 1.199 (colored)

Add 'e' key in buffer mode to open the buffer in an editor.

Revision 1.199 / (download) - annotate - [select for diffs], Sat May 16 14:26:33 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.198: +91 -19 lines
Diff to previous 1.198 (colored)

Build list of paths and weed out duplicates before loading configs, and
add TMUX_SOCK like TMUX_PATH for the socket directory.

Revision 1.198 / (download) - annotate - [select for diffs], Mon Apr 20 13:25:36 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.197: +12 -10 lines
Diff to previous 1.197 (colored)

Tidy up the terminal detection and feature code and add named sets of
terminal features, each of which are defined in one place and map to a
builtin set of terminfo(5) capabilities. Features can be specified based
on TERM with a new terminal-features option or with the -T flag when
running tmux. tmux will also detect a few common terminals from the DA
and DSR responses.

This is intended to make it easier to configure tmux's use of
terminfo(5) even in the presence of outdated ncurses(3) or terminfo(5)
databases or for features which do not yet have a terminfo(5) entry.
Instead of having to grok terminfo(5) capability names and what they
should be set to in the terminal-overrides option, the user can
hopefully just give tmux a feature name and let it do the right thing.

The terminal-overrides option remains both for backwards compatibility
and to allow tweaks of individual capabilities.

tmux already did much of this already, this makes it tidier and simpler
to configure.

Revision 1.197 / (download) - annotate - [select for diffs], Thu Apr 16 07:28:36 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.196: +13 -1 lines
Diff to previous 1.196 (colored)

Show signal name when process exits rather than number.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Apr 9 15:35:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.195: +2 -2 lines
Diff to previous 1.195 (colored)

More style nits.

Revision 1.195 / (download) - annotate - [select for diffs], Tue Mar 31 17:14:40 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored)

Add a way to mark environment variables as "hidden" so they can be used
by tmux but are not passed into the environment of new panes.

Revision 1.194 / (download) - annotate - [select for diffs], Tue Mar 17 11:10:12 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.193: +4 -4 lines
Diff to previous 1.193 (colored)

Ignore default-shell (and use /bin/sh) if it invalid not just if it is
tmux itself, also refuse to set the option to something invalid in the
first place. GitHub issue 2120.

Revision 1.193 / (download) - annotate - [select for diffs], Thu Mar 12 09:26:34 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.192: +9 -6 lines
Diff to previous 1.192 (colored)

When the server socket is given by the user with -S, create it with
umask 177 instead of 117 because it may not be in a safe directory like
the default directory in /tmp. The user can chmod it more open after it
is created if they want.

Revision 1.192 / (download) - annotate - [select for diffs], Tue Jan 28 11:31:31 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.191: +2 -2 lines
Diff to previous 1.191 (colored)

-V also needs to go in usage.

Revision 1.191 / (download) - annotate - [select for diffs], Tue Jan 28 10:44:30 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.190: +20 -2 lines
Diff to previous 1.190 (colored)

Reduce a difference with portable tmux by adding the -V flag and
#{version} format; on OpenBSD these just report the OpenBSD version.

Revision 1.190 / (download) - annotate - [select for diffs], Mon Oct 14 08:38:07 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.189: +2 -1 lines
Diff to previous 1.189 (colored)

Memory leaks, from Igor Wong in GitHub issue 1934.

Revision 1.189 / (download) - annotate - [select for diffs], Thu Jun 20 11:59:59 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.188: +4 -4 lines
Diff to previous 1.188 (colored)

Add a per-pane option set. Pane options inherit from window options (so
there should be no change to existing behaviour) and are set and shown
with set-option -p and show-options -p.

Change remain-on-exit and window-style/window-active-style to be pane
options (some others will be changed later).

This makes select-pane -P and -g unnecessary so no longer document them
(they still work) and no longer document set-window-option and
show-window-options in favour of set-option -w and show-options -w.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Apr 26 11:38:51 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.187: +1 -4 lines
Diff to previous 1.187 (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.187 / (download) - annotate - [select for diffs], Thu Nov 22 10:36:40 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.186: +27 -4 lines
Diff to previous 1.186 (colored)

Do not use PWD unless it actually matches the real working directory.

Revision 1.186 / (download) - annotate - [select for diffs], Fri Jan 12 10:22:02 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.185: +20 -18 lines
Diff to previous 1.185 (colored)

Improve error message if creating socket parent directory fails, from
Thomas Adam for GitHub issue 1215.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Jan 1 11:19:08 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.184: +5 -4 lines
Diff to previous 1.184 (colored)

Prefer PWD for current directory if present in client, from Wei Zhao in
GitHub issue 1183.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Jul 12 09:21:25 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.183: +7 -7 lines
Diff to previous 1.183 (colored)

Make shell_command a global like other stuff rather than making it an
exception and using callback argument.

Revision 1.183 / (download) - annotate - [select for diffs], Mon Jul 3 08:08:30 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.182: +3 -2 lines
Diff to previous 1.182 (colored)

Try C.UTF-8 which is also a commonly useful locale on some platforms,
from Romain Francoise.

Revision 1.182 / (download) - annotate - [select for diffs], Sat Apr 22 12:08:41 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.181: +1 -2 lines
Diff to previous 1.181 (colored)

Do not need getopt.h.

Revision 1.181 / (download) - annotate - [select for diffs], Thu Apr 20 17:49:26 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.180: +4 -3 lines
Diff to previous 1.180 (colored)

Use fdforkpty() instead of our own unwrapped versions.

Revision 1.180 / (download) - annotate - [select for diffs], Wed Apr 19 12:44:29 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.179: +2 -2 lines
Diff to previous 1.179 (colored)

Style nits and a missing cast.

Revision 1.179 / (download) - annotate - [select for diffs], Sun Apr 16 20:33:46 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.178: +3 -1 lines
Diff to previous 1.178 (colored)

Memory leak, from David CARLIER.

Revision 1.178 / (download) - annotate - [select for diffs], Tue Mar 21 19:28:03 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.177: +3 -4 lines
Diff to previous 1.177 (colored)

Use uid_t for UID not u_int.

Revision 1.177 / (download) - annotate - [select for diffs], Thu Feb 16 10:53:25 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.176: +2 -2 lines
Diff to previous 1.176 (colored)

Style nits.

Revision 1.176 / (download) - annotate - [select for diffs], Mon Jan 23 10:09:43 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.175: +4 -1 lines
Diff to previous 1.175 (colored)

Open /dev/ptm before pledge() and save it to be used for PTMGET later
(this means inlining forkpty()).

ok deraadt

Revision 1.175 / (download) - annotate - [select for diffs], Sun Jan 15 20:48:41 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.174: +21 -11 lines
Diff to previous 1.174 (colored)

Major tidy up and rework of options tree and set-option/show-options
commands this pushes more of the code into options.c and ties it more
closely to the options table rather than having an unnecessary
split. Also add support for array options (will be used later). Only
(intentional) user visible change is that show-options output is now
passed through vis(3) with VIS_DQ so quotes are escaped.

Revision 1.174 / (download) - annotate - [select for diffs], Thu Jan 12 15:36:35 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.173: +3 -2 lines
Diff to previous 1.173 (colored)

Simplify appending to string options.

Revision 1.173 / (download) - annotate - [select for diffs], Fri Dec 9 21:39:27 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.172: +2 -2 lines
Diff to previous 1.172 (colored)

Spacing nits.

Revision 1.172 / (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.171: +6 -3 lines
Diff to previous 1.171 (colored)

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

Revision 1.171 / (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.170: +4 -4 lines
Diff to previous 1.170 (colored)

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

Revision 1.170 / (download) - annotate - [select for diffs], Fri May 27 17:05:42 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.169: +3 -3 lines
Diff to previous 1.169 (colored)

Use getprogname() instead of __progname to make portability easier.

Revision 1.169 / (download) - annotate - [select for diffs], Wed May 4 21:29:47 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.168: +2 -3 lines
Diff to previous 1.168 (colored)

Fix up a couple of long lines.

Revision 1.168 / (download) - annotate - [select for diffs], Sat Mar 5 16:08:38 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.167: +10 -5 lines
Diff to previous 1.167 (colored)

If setlocale("en_US.UTF-8") succeeds, then don't do the check for UTF-8
locale since if it isn't UTF-8 the system is broken anyway. If it fails,
try "" and check for UTF-8 with nl_langinfo(CODESET) rather than
wcwidth(). Based on a diff from schwarze@, nl_langinfo also suggested by
stsp@.

Revision 1.167 / (download) - annotate - [select for diffs], Sat Mar 5 07:44:31 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.166: +6 -3 lines
Diff to previous 1.166 (colored)

Although we always have en_US.UTF-8 on OpenBSD, some platforms do not,
so fall back to setlocale(LC_CTYPE, ""). tmux requires a UTF-8 locale,
so check with wcwidth() on a UTF-8 character after setlocale().

Revision 1.166 / (download) - annotate - [select for diffs], Tue Mar 1 12:02:54 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.165: +1 -2 lines
Diff to previous 1.165 (colored)

Remove unused variables, from Michal Mazurek.

Revision 1.165 / (download) - annotate - [select for diffs], Tue Mar 1 12:02:08 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.164: +4 -1 lines
Diff to previous 1.164 (colored)

Use system wcwidth() instead of carrying around UTF-8 width tables.

Revision 1.164 / (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_5_9_BASE, OPENBSD_5_9
Changes since 1.163: +2 -2 lines
Diff to previous 1.163 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.163 / (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.162: +4 -1 lines
Diff to previous 1.162 (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.162 / (download) - annotate - [select for diffs], Tue Nov 24 23:46:15 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.161: +2 -2 lines
Diff to previous 1.161 (colored)

Make environ_set va_args and use it to tidy up some calls. Also add a
missing word in manpage (from jmc).

Revision 1.161 / (download) - annotate - [select for diffs], Tue Nov 24 23:22:51 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.160: +6 -7 lines
Diff to previous 1.160 (colored)

Shell command from -c doesn't have to be global, pass it as an argument.

Revision 1.160 / (download) - annotate - [select for diffs], Tue Nov 24 22:27:22 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.159: +40 -48 lines
Diff to previous 1.159 (colored)

Tidy the code that works out the socket path, and just use the full path
in the global socket_path rather than copying it.

Revision 1.159 / (download) - annotate - [select for diffs], Tue Nov 24 22:09:53 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.158: +1 -9 lines
Diff to previous 1.158 (colored)

Remove malloc_options DEBUG bit.

Revision 1.158 / (download) - annotate - [select for diffs], Tue Nov 24 21:52:06 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.157: +2 -2 lines
Diff to previous 1.157 (colored)

Remove the -I part of show-messages which isn't really that useful; the
server start time can now be accessed with a new start_time format (use:
tmux display -p '#{t:start_time}')

Revision 1.157 / (download) - annotate - [select for diffs], Tue Nov 24 21:19:46 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.156: +2 -15 lines
Diff to previous 1.156 (colored)

Make the log stuff a bit tidier with some helper functions.

Revision 1.156 / (download) - annotate - [select for diffs], Sun Nov 22 19:41:19 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.155: +3 -3 lines
Diff to previous 1.155 (colored)

Add getpw to pledge, makes tmux work in YP environments, discovered by
matthieu, ok deraadt

Revision 1.155 / (download) - annotate - [select for diffs], Fri Nov 20 12:01:19 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.154: +4 -4 lines
Diff to previous 1.154 (colored)

Instead of separate tables for different types of options, give each
option a scope type (server, session, window) in one table.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Nov 15 14:32:48 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.153: +2 -2 lines
Diff to previous 1.153 (colored)

Accidentally turned off pledge, turn it back on.

Revision 1.153 / (download) - annotate - [select for diffs], Sat Nov 14 09:41:07 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

Push stdout and stderr to clients more aggressively, and add an event to
continue if the send fails.

Revision 1.152 / (download) - annotate - [select for diffs], Thu Nov 12 11:24:08 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.151: +23 -17 lines
Diff to previous 1.151 (colored)

tmux is UTF-8, so if $TMUX is set (tmux running in tmux), the client is
UTF-8. Also try to make the existing checks more readable.

Revision 1.151 / (download) - annotate - [select for diffs], Thu Nov 12 11:09:11 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.150: +1 -7 lines
Diff to previous 1.150 (colored)

Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
terminal. We still support non-UTF-8 terminals outside tmux, but inside
it is always UTF-8 (as when the utf8 and status-utf8 options were on).

Revision 1.150 / (download) - annotate - [select for diffs], Wed Nov 11 23:23:33 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.149: +1 -2 lines
Diff to previous 1.149 (colored)

Drop mouse-utf8 option and always turn on UTF-8 mouse if the client says
it supports UTF-8.

Revision 1.149 / (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.148: +5 -5 lines
Diff to previous 1.148 (colored)

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

Revision 1.148 / (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.147: +16 -17 lines
Diff to previous 1.147 (colored)

Move struct options into options.c.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Oct 27 13:23:24 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.146: +2 -4 lines
Diff to previous 1.146 (colored)

Break the common process set up, event loop and imsg dispatch code
between server and client out into a separate internal API. This will
make it easier to add another process.

Revision 1.146 / (download) - annotate - [select for diffs], Sun Oct 25 07:48:16 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.145: +1 -3 lines
Diff to previous 1.145 (colored)

Let's see if anyone screams about not being able to specify $TMPDIR
for their tmux sockets.

(Over the years, I have seen $TMPDIR set up worse than /tmp many times,
and don't know how this practice infected other parts of the system.
Nothing uses tmpdir(3), nor a huge-temporary-file program like sort.)
ok nicm

Revision 1.145 / (download) - annotate - [select for diffs], Fri Oct 23 16:07:29 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.144: +6 -1 lines
Diff to previous 1.144 (colored)

tmux can call pledge() in main with large set and then reduce it
slightly in the server to "stdio rpath wpath cpath fattr unix recvfd
proc exec tty ps".

Revision 1.144 / (download) - annotate - [select for diffs], Mon Sep 14 12:12:24 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.143: +2 -1 lines
Diff to previous 1.143 (colored)

Move tzset() from log_open to main.

Revision 1.143 / (download) - annotate - [select for diffs], Thu Sep 3 14:30:23 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.142: +2 -3 lines
Diff to previous 1.142 (colored)

A couple of style nits.

Revision 1.142 / (download) - annotate - [select for diffs], Tue Sep 1 10:10:59 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.141: +9 -21 lines
Diff to previous 1.141 (colored)

Work out config file when needed not at startup.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Aug 30 22:56:36 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.140: +14 -14 lines
Diff to previous 1.140 (colored)

Path from $TMUX does not need to be global anymore.

Revision 1.140 / (download) - annotate - [select for diffs], Sun Aug 30 22:40:25 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.139: +7 -31 lines
Diff to previous 1.139 (colored)

Login shell can be a client flag, and move the exec code into client.c.

Revision 1.139 / (download) - annotate - [select for diffs], Sun Aug 30 22:19:07 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.138: +2 -5 lines
Diff to previous 1.138 (colored)

Event base does not need to be global.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Aug 30 15:43:40 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

Some style nits and dead assignments.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Jul 20 15:50:04 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.136: +20 -10 lines
Diff to previous 1.136 (colored)

Add an option (history-file) for a file to save/restore command prompt
history, from Olof-Joachim Frahm.

Revision 1.136 / (download) - annotate - [select for diffs], Thu Jun 4 20:34:22 2015 UTC (8 years, 11 months ago) by jmc
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (colored)

tweak SYNOPSIS and usage();

Revision 1.135 / (download) - annotate - [select for diffs], Mon Jan 19 09:58:34 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.134: +2 -2 lines
Diff to previous 1.134 (colored)

Make a tmux-%u directory under TMUX_TMPDIR, like TMPDIR.

Revision 1.134 / (download) - annotate - [select for diffs], Mon Jan 19 09:57:33 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.133: +2 -2 lines
Diff to previous 1.133 (colored)

Only care about other permissions, allow group to be set.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Jan 19 09:53:15 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.132: +2 -3 lines
Diff to previous 1.132 (colored)

Remove unnecessary duplicate S_ISDIR check, from Dmitri Paduchikh.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Oct 20 23:27:14 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.131: +5 -4 lines
Diff to previous 1.131 (colored)

Tidy up some includes.

Revision 1.131 / (download) - annotate - [select for diffs], Thu Apr 17 07:55:43 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.130: +5 -6 lines
Diff to previous 1.130 (colored)

Remove the "info" message mechanism, this was only used for about five
mostly useless and annoying messages. Change those commands to silence
on success like all the others. Still accept the -q command line flag
and "quiet" server option for now.

Revision 1.130 / (download) - annotate - [select for diffs], Mon Mar 31 21:42:45 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

Remove log_debug2 as well and simplify log.c.

Revision 1.129 / (download) - annotate - [select for diffs], Sun Feb 16 12:45:17 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.128: +2 -2 lines
Diff to previous 1.128 (colored)

Leftovers from removing 88 colour support, from Theo Buehler.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Jan 15 11:46:28 2014 UTC (10 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.127: +11 -6 lines
Diff to previous 1.127 (colored)

Do not attempt to read .tmux.conf if we can't figure out a home
directory, from Tiago Cunha.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Jan 9 14:05:55 2014 UTC (10 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.126: +6 -2 lines
Diff to previous 1.126 (colored)

Three small changes from Tiago Cunha:

- Check for truncation when copying path.
- Don't need to use a temporary buffer in screen_set_title.
- Include strerror in output when connecting to server fails.

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

We accidentally haven't been using $TMUX to work out the session for a
while and in fact it is less useful that using the client ttyname. So
don't bother and don't pass it from the client. If we need it in future
it is in c->environ.

Revision 1.125 / (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.124: +4 -26 lines
Diff to previous 1.124 (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.124 / (download) - annotate - [select for diffs], Thu Oct 10 12:12:08 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.123: +9 -9 lines
Diff to previous 1.123 (colored)

Merge IDENTIFY_* flags with CLIENT_* flags.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Oct 10 12:03:22 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.122: +5 -3 lines
Diff to previous 1.122 (colored)

Don't treat TMUX_TMPDIR as a potential file

The point of setting TMUX_TMPDIR is to then make any labels from -L go
to that directory.  In the case of makesocketpath() with no TMUX_TMPDIR
set, would set both the path and the default socket to a file.  The
checking of the permissions on the file worked fine in that case, but
when TMUX_TMPDIR is set, won't work on a directory.

This fixes the problem by ensuring the check on the permissions is
performed on directories only.

By Thomas Adam.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Oct 5 10:40:49 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.121: +10 -8 lines
Diff to previous 1.121 (colored)

Fix previous not to leak fd on failure, whoops.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Oct 5 08:12:39 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.120: +10 -4 lines
Diff to previous 1.120 (colored)

Use open(".")/fchdir() to save and restore current directory rather than
getcwd()/chdir().

Revision 1.120 / (download) - annotate - [select for diffs], Wed Apr 24 10:01:32 2013 UTC (11 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.119: +2 -2 lines
Diff to previous 1.119 (colored)

Rename global configuration define.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Apr 11 21:52:18 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.118: +4 -1 lines
Diff to previous 1.118 (colored)

Call setlocale(LC_TIME) at startup.

Revision 1.118 / (download) - annotate - [select for diffs], Wed Mar 27 11:24:18 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.117: +6 -4 lines
Diff to previous 1.117 (colored)

Add TMUX_TMPDIR variable to put the socket directory outside
TMPDIR. From Ben Boeckel.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Mar 27 11:17:12 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.116: +2 -7 lines
Diff to previous 1.116 (colored)

Remove tmux's (already minimal) 88 colour support. Such terminals are
few and unnecessary.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Mar 25 10:11:45 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.115: +5 -5 lines
Diff to previous 1.115 (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.115 / (download) - annotate - [select for diffs], Sun Mar 24 09:54:10 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.114: +1 -3 lines
Diff to previous 1.114 (colored)

Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent
commands. This allows run-shell and if-shell to be synchronous which has
been much requested.

Each client has a default command queue and commands are consumed one at
a time from it. A command may suspend execution from the queue by
returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() -
for example run-shell does this from the callback that is fired after
the job is freed.

When the command queue becomes empty, command clients are automatically
exited (unless attaching). A callback is also fired - this is used for
nested commands in, for example, if-shell which can block execution of
the client's cmdq until a new cmdq becomes empty.

Also merge all the old error/info/print functions together and lose the
old curclient/cmdclient distinction - a cmdq is bound to one client (or
none if in the configuration file), this is a command client if
c->session is NULL otherwise an attached client.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Nov 27 16:12:29 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.113: +3 -1 lines
Diff to previous 1.113 (colored)

Correctly aggregate together errors from nested config files (with
source-file). Fix by Thomas Adam, reported by Sam Livingstone-Gray

Revision 1.113 / (download) - annotate - [select for diffs], Mon Nov 26 11:35:28 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.112: +7 -5 lines
Diff to previous 1.112 (colored)

Call realpath earlier on the socket directory path rather than on the
socket file path because the latter may not exist yet and in that case
realpath is allowed to fail. From Romain Francoise.

Revision 1.112 / (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_2_BASE, OPENBSD_5_2
Changes since 1.111: +9 -14 lines
Diff to previous 1.111 (colored)

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

Revision 1.111 / (download) - annotate - [select for diffs], Mon Jun 18 13:16:42 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.110: +8 -2 lines
Diff to previous 1.110 (colored)

Add a skeleton mode to tmux (called "control mode") that let's tmux
commands be sent and output received on stdout. This can be used to
integrate with other terminal emulators and should allow some other
things to be made simpler later. More to come so doesn't do much yet and
deliberately not documented.

Revision 1.110 / (download) - annotate - [select for diffs], Wed May 30 15:01:21 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.109: +1 -2 lines
Diff to previous 1.109 (colored)

Do not use stderr for log file and don't call log_close when not needed.

Revision 1.109 / (download) - annotate - [select for diffs], Fri May 25 08:28:10 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.108: +3 -5 lines
Diff to previous 1.108 (colored)

Simplify logging and just fprintf(stderr, ...) for early errors.

Revision 1.108 / (download) - annotate - [select for diffs], Sat Jan 21 08:40:09 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.107: +1 -8 lines
Diff to previous 1.107 (colored)

Drop the ability to have a list of keys in the prefix in favour of two
separate options, prefix and prefix2. This simplifies the code and gets
rid the data options type which was only used for this one option.

Also add a -2 flag to send-prefix to send the secondary prefix key,
fixing a cause of minor irritation.

People who want three prefix keys are out of luck :-).

Revision 1.107 / (download) - annotate - [select for diffs], Sun Oct 23 08:34:01 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.106: +17 -1 lines
Diff to previous 1.106 (colored)

Try to resolve relative paths for loadb and saveb (first using client
working directory if any then default-path or session wd).

Revision 1.106 / (download) - annotate - [select for diffs], Sun Oct 23 08:03:27 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

Ignore LC_ALL and LC_CTYPE if they are empty as well as unset.

Revision 1.105 / (download) - annotate - [select for diffs], Sun Sep 25 18:53:04 2011 UTC (12 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.104: +4 -2 lines
Diff to previous 1.104 (colored)

Reject $SHELL if it is not a full path.

Revision 1.104 / (download) - annotate - [select for diffs], Fri Mar 4 23:26:44 2011 UTC (13 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.103: +2 -2 lines
Diff to previous 1.103 (colored)

Two fixes by Micah Cowan: make mouse work properly beyond >127 on signed
char architectures and properly parse $TMUX by stopping the socket path
at the first comma.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jan 23 11:03:43 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.102: +10 -37 lines
Diff to previous 1.102 (colored)

Set $TMUX without the session when background jobs are run.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Jan 12 22:23:58 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.101: +6 -3 lines
Diff to previous 1.101 (colored)

Use TMPDIR if set, from Han Boetes.

Revision 1.101 / (download) - annotate - [select for diffs], Sat Jan 8 01:52:37 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.100: +18 -8 lines
Diff to previous 1.100 (colored)

Move all calls to fcntl(...O_NONBLOCK) into a function and clear the
flag on the stdio file descriptors before closing them (fixes things
like "tmux ls && cat").

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jan 3 23:35:21 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.99: +2 -1 lines
Diff to previous 1.99 (colored)

Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
and supports larger terminals than the older way.

If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.

With help and based on code from hsim at gmx.li.

Revision 1.99 / (download) - annotate - [select for diffs], Sat Jan 1 16:51:21 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.98: +18 -109 lines
Diff to previous 1.98 (colored)

Move the user-visible parts of all options (names, types, limit, default
values) together into one set of tables in options-table.c. Also clean
up and simplify cmd-set-options.c and move a common print function into
option-table.c.

Revision 1.98 / (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.97: +2 -2 lines
Diff to previous 1.97 (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.97 / (download) - annotate - [select for diffs], Sun Dec 19 18:35:08 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.96: +3 -1 lines
Diff to previous 1.96 (colored)

Add other-pane-height and other-pane-width options, allowing the width
or height of the smaller panes in the main-horizontal and main-vertical
layouts to be set. Mostly from David Goodlad.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Dec 8 19:57:03 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

In the built-in layouts, distribute the panes more evenly. Set the
default value of main-pane-width to 80, rather than 81. By Micah Cowan.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Dec 6 22:51:02 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.94: +3 -1 lines
Diff to previous 1.94 (colored)

Add an option to alert (monitor) for silence (lack of activity) in a
window. From Thomas Adam.

Revision 1.94 / (download) - annotate - [select for diffs], Mon Nov 29 19:45:58 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.93: +13 -5 lines
Diff to previous 1.93 (colored)

If VISUAL or EDITOR contains "vi", configure mode-keys and status-keys
to vi.

Based on a diff from martynas@, previously requested by a couple of
other people.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Nov 11 21:06:09 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.92: +6 -3 lines
Diff to previous 1.92 (colored)

Add XAUTHORITY to update-environment, requested by Andreas Kloeckner.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Oct 18 20:00:03 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.91: +44 -232 lines
Diff to previous 1.91 (colored)

Merge the before and after attach client code into one in client.c
(instead of two in tmux.c and client.c).

Revision 1.91 / (download) - annotate - [select for diffs], Sat Oct 16 08:42:35 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.90: +9 -1 lines
Diff to previous 1.90 (colored)

Make stdio blocking again before calling shell command with -c.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Oct 16 08:31:55 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.89: +3 -1 lines
Diff to previous 1.89 (colored)

Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Oct 14 17:38:39 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.88: +9 -4 lines
Diff to previous 1.88 (colored)

Use an explicit event rather than event_once for the main event so it
can be removed when the client becomes ready.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Sep 26 20:43:30 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.87: +3 -1 lines
Diff to previous 1.87 (colored)

Two new options:

- server option "exit-unattached" makes the server exit when no clients
  are attached, even if sessions are present;

- session option "destroy-unattached" destroys a session once no clients
  are attached to it.

These are useful for preventing tmux remaining in the background where
it is undesirable and when using tmux as a login shell to keep a limit
on new sessions.

Revision 1.87 / (download) - annotate - [select for diffs], Thu Aug 19 18:29:01 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

Do not call event_del() for signals after fork(), just use sigaction()
directly instead - calling libevent functions after fork() w/o
event_reinit() is a bad idea, even if in this case it was harmless.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Aug 4 19:46:13 2010 UTC (13 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.85: +1 -4 lines
Diff to previous 1.85 (colored)

switch back to kqueue for now, since (a) kqueue has been fixed to deal
with strange devices and (b) since there appears to be a bull in the
poll code in libevent as well...
requested by nicm who is away

Revision 1.85 / (download) - annotate - [select for diffs], Sat Jul 24 19:25:31 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.84: +4 -1 lines
Diff to previous 1.84 (colored)

kqueue(2) is currently broken when used with /dev/null and a few other
devices.

An upcoming fix for some problems with the client stdout/stderr handling
relies on it working, so make tmux force libevent to use poll(2) via
EVENT_NOKQUEUE, until we have fixed kqueue.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Jul 11 17:06:45 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.83: +9 -7 lines
Diff to previous 1.83 (colored)

Return the command client return code with MSG_EXIT now that MSG_ERROR and
MSG_PRINT are unused.

New clients should be compatible with old tmux servers but vice versa may print
an error.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Jun 28 22:10:42 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.82: +1 -13 lines
Diff to previous 1.82 (colored)

Send all three of stdin, stdout, stderr from the client to the server, so that
commands can directly make use of them. This means that load-buffer and
save-buffer can have "-" as the file to read from stdin or write to stdout.

This is a protocol version bump so the tmux server will need to be restarted
after upgrade (or an older client used).

Revision 1.82 / (download) - annotate - [select for diffs], Sun Jun 27 02:56:59 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.81: +3 -11 lines
Diff to previous 1.81 (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.81 / (download) - annotate - [select for diffs], Sun Jun 27 00:22:22 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.80: +3 -2 lines
Diff to previous 1.80 (colored)

New option, detach-on-destroy, to set what happens to a client when the session
it is attached to is destroyed. If on (the default), it is detached; if off, it
is switched to the most recently active session.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jun 26 18:20:53 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed
after the command is executing is bogus because it may still be needed if the
same command is going to be executed again (for example if you "bind-key a
bind-key b ..."). Making a copy is hard, so instead add a reference count to
the cmd_list.

While here, also print bind-key -n and the rest of the flags properly.

Fixes problem reported by mcbride@.

Revision 1.79 / (download) - annotate - [select for diffs], Fri May 14 19:03:09 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.78: +4 -1 lines
Diff to previous 1.78 (colored)

Colour+attribute options for status line alerts, from Alex Alexander.

Revision 1.78 / (download) - annotate - [select for diffs], Tue May 4 17:28:16 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.77: +13 -64 lines
Diff to previous 1.77 (colored)

Put this back in with the initialisation in the right order.

Revision 1.77 / (download) - annotate - [select for diffs], Tue May 4 08:48:06 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.76: +63 -16 lines
Diff to previous 1.76 (colored)

Revert last change, it appears to be broken somehow.

Revision 1.76 / (download) - annotate - [select for diffs], Mon May 3 16:06:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.75: +17 -64 lines
Diff to previous 1.75 (colored)

Make signal handler setup/teardown two common functions instead of six,
and reset SIGCHLD after fork to fix problems with some shells. From
Romain Francois.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Apr 28 18:22:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

Make the active pane border have a green foreground instead of
background by default.

Revision 1.74 / (download) - annotate - [select for diffs], Sun Apr 18 13:41:29 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.73: +10 -1 lines
Diff to previous 1.73 (colored)

Catch SIGCHLD to avoid a zombie, from patrick keshishian.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Feb 22 20:41:16 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.72: +2 -1 lines
Diff to previous 1.72 (colored)

Option to set the characters considered word separators in copy mode, from
Micah Cowan.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Feb 8 00:14:38 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

Add an option to disable the smcup/rmcup alternate screen behaviour inside
tmux. From clemens fischer.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Feb 6 18:47:41 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.70: +17 -2 lines
Diff to previous 1.70 (colored)

Change nested check to compare server socket path rather than just assuming
that if $TMUX is set it is nested. From Micah Cowan.

Revision 1.70 / (download) - annotate - [select for diffs], Sat Feb 6 18:29:15 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.69: +32 -18 lines
Diff to previous 1.69 (colored)

Clean up $TMUX parsing, from Micah Cowan, tweaked by me.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Feb 6 17:15:33 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.68: +2 -7 lines
Diff to previous 1.68 (colored)

Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode
displaying them.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Feb 4 18:27:06 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.67: +24 -7 lines
Diff to previous 1.67 (colored)

Read the path from $TMUX if it is present and -L and -S are not given. Based on
a diff from Micah Cowan.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Feb 4 18:20:16 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.66: +2 -1 lines
Diff to previous 1.66 (colored)

Option to display the active pane in a different colour with the display-panes
command. From Paul Hoffman, thanks.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Jan 3 12:51:05 2010 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.65: +5 -1 lines
Diff to previous 1.65 (colored)

Options to set the colour of the pane borders, with different colours for the
active pane.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Dec 14 10:43:41 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.64: +2 -1 lines
Diff to previous 1.64 (colored)

New server option, escape-time, to set the timeout used to detect if escapes
are alone or part of a function key or meta sequence.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Dec 11 13:58:48 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Use quiet variable, and add missing sentinel to options array.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Dec 10 09:16:52 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.62: +9 -5 lines
Diff to previous 1.62 (colored)

Add "server options" which are server-wide and not bound to a session or
window. Set and displayed with "set -s" and "show -s".

Currently the only option is "quiet" (like command-line -q, allowing it to be
set from .tmux.conf), but others will come along.

Revision 1.62 / (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.61: +12 -12 lines
Diff to previous 1.61 (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.61 / (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.60: +3 -1 lines
Diff to previous 1.60 (colored)

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

Revision 1.60 / (download) - annotate - [select for diffs], Thu Nov 19 16:22:10 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.59: +3 -1 lines
Diff to previous 1.59 (colored)

Two new options, window-status-format and window-status-current-format, which
allow the format of each window in the status line window list to be controlled
using similar # sequences as status-left/right.

This diff also moves part of the way towards UTF-8 support in window names but
it isn't quite there yet.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Nov 19 14:06:34 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

Revert to xterm-keys off by default. It was on as an experiment to see if the
option could be removed, but it affects vi, so we have to keep the option, and
a conservative default is better.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Nov 18 13:16:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.57: +2 -1 lines
Diff to previous 1.57 (colored)

Add a per-client log of status line messages displayed while that client
exists. A new message-limit session option sets the maximum number of entries
and a command, show-messages, shows the log (bound to ~ by default).

This (and prompt history) might be better as a single global log but until
there are global options it is easier for them to be per client.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Nov 10 18:53:11 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

There is no real standard for modifier plus function keys. Previously, tmux
output some from rxvt but in other ways did the same as xterm or other
terminals, but this is a bit inconsistent.

xterm's method is fairly sensible and we already support it (xterm-keys), so
enable it by default instead.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Nov 4 20:59:22 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.55: +1 -2 lines
Diff to previous 1.55 (colored)

A couple of minor cosmetic changes.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Nov 4 20:50:11 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.54: +136 -167 lines
Diff to previous 1.54 (colored)

Initial changes to move tmux to libevent.

This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.

Moving the server stuff over to bufferevents and timers and so on will come
later.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Nov 4 12:41:43 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.53: +6 -2 lines
Diff to previous 1.53 (colored)

Change declaration and use of malloc_options to be more standard, from Tim van
der Molen.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Oct 26 21:42:04 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.52: +6 -6 lines
Diff to previous 1.52 (colored)

tabs are better; ok nicm

Revision 1.52 / (download) - annotate - [select for diffs], Sun Oct 25 21:11:21 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.51: +2 -5 lines
Diff to previous 1.51 (colored)

Remove the -d flag to tmux and just use op/AX to detect default colours.

Irritatingly, although op can be used to tell if a terminal supports default
colours, it can't be used to set them because in some terminfo descriptions it
resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so
it is not possible to determine reliably what the terminal state will be
afterwards. So if AX is missing and op is present, tmux just sends sgr0.

Anyone using -d for a terminal who finds they actually needed it can replace it
using terminal-overrides, but please let me know as it is probably an omission
from terminfo.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Oct 22 10:04:07 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.50: +29 -37 lines
Diff to previous 1.50 (colored)

Merge prepare_cmd into main as it is short and only called once.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Oct 21 20:11:47 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.49: +65 -30 lines
Diff to previous 1.49 (colored)

Client tidying: get rid of client_ctx struct in favour of two variables in
client.c, and move the functions in client-fn.c into other files.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Oct 10 14:51:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (colored)

New option, mouse-select-pane. If on, the mouse may be used to select the
current pane.

Suggested by sthen@ and also by someone else ages ago who I have forgotten.

Revision 1.48 / (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.47: +2 -3 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Fri Oct 9 07:27:00 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

Add a simple synchronize-panes window option: when set, all input to any pane
that is part of the window is also sent to all other panes in the same
window. Suggested by several, most recently Tomasz Pajor.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Sep 23 12:03:31 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.45: +57 -11 lines
Diff to previous 1.45 (colored)

Support -c like sh(1) to execute a command, useful when tmux is a login
shell. Suggested by halex@.

This includes another protocol version increase (the last for now) so again
restart the tmux server before upgrading.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Sep 23 06:18:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.44: +8 -52 lines
Diff to previous 1.44 (colored)

Remove the internal tmux locking and instead detach each client and run the
command specified by a new option "lock-command" (by default "lock -np") in
each client.

This means each terminal has to be unlocked individually but simplifies the
code and allows the system password to be used to unlock.

Note that the set-password command is gone, so it will need to be removed from
configuration files, and the -U command line flag has been removed.

This is the third protocol version change so again it is best to stop the tmux
server before upgrading.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Sep 22 12:38:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.43: +7 -2 lines
Diff to previous 1.43 (colored)

Permit multiple prefix keys to be defined, separated by commas, for example:

set -g prefix ^a,^b

Any key in the list acts as the prefix. The send-prefix command always sends
the first key in the list.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Sep 18 15:19:27 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)

New option, set-titles-string, to allow the window title to be specified (as
for status-left/right) if set-titles is on. Also only update the title when the
status line is being redrawn.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Sep 4 15:15:24 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.41: +91 -90 lines
Diff to previous 1.41 (colored)

Tidy main and make it a bit easier to read.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Sep 2 17:34:57 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.40: +10 -5 lines
Diff to previous 1.40 (colored)

Accept -l to make it easier for people who use tmux as a login shell to use
$SHELL. Originally from martynas@, tweaked by me.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Sep 2 16:38:35 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.39: +3 -1 lines
Diff to previous 1.39 (colored)

When incorrect passwords are entered, behave similarly to login(1) and backoff
for a bit. Based on a diff from martynas@.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Sep 1 13:09:50 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.38: +47 -1 lines
Diff to previous 1.38 (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.38 / (download) - annotate - [select for diffs], Tue Sep 1 09:11:05 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Use "Password:" with no space for password prompts and don't display a *s for
the password, like pretty much everything else. From martynas@ with minor
tweaks by me.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Sep 1 09:00:54 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.36: +7 -7 lines
Diff to previous 1.36 (colored)

Sort cases same as getopt argument, from martynas.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Aug 31 20:46:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored)

Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Aug 23 18:21:02 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

Add some other obvious variables to update-environment (WINDOWID SSH_ASKPASS
SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION) so they are updated in the session
environment on new/attach.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Aug 13 21:56:14 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Disable mode-mouse (mouse in copy/choice mode) by default as it isn't very
useful at the moment and causes confusion.

Revision 1.33 / (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.32: +2 -1 lines
Diff to previous 1.32 (colored)

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

Revision 1.32 / (download) - annotate - [select for diffs], Wed Aug 12 09:14:25 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.31: +3 -4 lines
Diff to previous 1.31 (colored)

When started as the shell, __progname contains a leading -, so hardcode "tmux"
for socket path and log files, and strip it when working out the shell.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Aug 11 17:18:35 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.30: +69 -35 lines
Diff to previous 1.30 (colored)

Switch tmux to use imsg. This is the last major change to make the
client-server protocol more resilient and make the protocol versioning work
properly. In future, the only things requiring a protocol version bump will be
changes in the message structs, and (when both client and server have this
change) mixing different versions should nicely report an error message.

As a side effect this also makes the code tidier, fixes a problem with the way
errors reported during server startup were handled, and supports fd passing
(which will be used in future).

Looked over by eric@, thanks.

Please note that mixing a client with this change with an older server or vice
versa may cause tmux to crash or hang - tmux should be completely exited before
upgrading.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Aug 10 20:51:29 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

No arguments are the same as new-session and this requires the environment to
be sent, so set that flag too when argc == 0.

Revision 1.29 / (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.28: +11 -5 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Sat Aug 8 20:36:42 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.27: +9 -3 lines
Diff to previous 1.27 (colored)

Options to set the colours and attributes for status-left/-right. From Thomas
Adam, thanks.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Aug 5 16:26:38 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

If colours are not supported by the terminal, try to emulate a coloured
background by setting or clearing the reverse attribute.

This makes a few applications which don't use the reverse attribute themselves
a little happier, and allows the status, message and mode options to have
default attributes and fg/bg options that work as expected when set as reverse.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Aug 4 10:31:28 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.25: +3 -2 lines
Diff to previous 1.25 (colored)

Check for "UTF8" as well as "UTF-8" in LANG etc as it seems this may also
appear.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Aug 3 14:10:54 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.24: +3 -1 lines
Diff to previous 1.24 (colored)

Add a terminal-overrides session option allowing individual terminfo(5) entries
to be overridden. The 88col/256col checks are now moved into the default
setting and out of the code.

Also remove a couple of old workarounds for xterm and rxvt which are no longer
necessary (tmux can emulate them if missing).

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jul 30 07:04:50 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.23: +3 -2 lines
Diff to previous 1.23 (colored)

Add a mode-mouse option to prevent tmux taking over the mouse in choice or copy
modes.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jul 29 14:17:26 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored)

Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jul 29 05:36:53 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Taking account of the "s, 22 not 24 is the maximum length of #T in status-right
to prevent the date being cut off.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 26 12:58:44 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.20: +84 -44 lines
Diff to previous 1.20 (colored)

Make all messages sent between the client and server fixed size.

This is the first of two changes to make the protocol more resilient and less
sensitive to other changes in the code, particularly with commands. The client
now packs argv into a buffer and sends it to the server for parsing, rather
than doing it itself and sending the parsed command data.

As a side-effect this also removes a lot of now-unused command marshalling
code.

Mixing a server without this change and a client with or vice versa will cause
tmux to hang or crash, please ensure that tmux is entirely killed before
upgrading.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jul 22 21:58:56 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.19: +5 -6 lines
Diff to previous 1.19 (colored)

Pass a set of flags into client_init rather than just a start_server
variable. Only one flag now but more to come later.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jul 20 14:37:51 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

Display the number of failed password attempts (if any) when the server is
locked. From Tom Doherty.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jul 20 14:32:09 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

Add a status-justify option to allow the window list in the status line to be
positioned at the left, centre, or right.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 20 09:15:18 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.16: +4 -1 lines
Diff to previous 1.16 (colored)

New options, window-status-current-{fg,bg,attr}, to set the fg, bg and
attributes with which the current window is shown in the status line. From
Johan Friis, thanks.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jul 18 14:59:25 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.15: +4 -1 lines
Diff to previous 1.15 (colored)

Add three new session options: visual-activity, visual-bell, visual-content. If
these are enabled (and the monitor-activity, bell-actio and monitor-content
options are configurated appropriately), when activity, a bell, or content is
detected, a message is shown.

Also tidy up the bell/activity/content code in server.c slightly and fix a
couple of errors.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jul 17 13:38:03 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.14: +25 -19 lines
Diff to previous 1.14 (colored)

If -u is specified or UTF-8 is otherwise detected when the server is started,
enable the utf8 and status-utf8 optons. While here, note in the man page that
the server is started with the first session and exits when none remain.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jul 10 05:50:54 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

Add a default-terminal option to set the starting value of $TERM in new
windows.

This is "screen" by default and must be either that or something closely
related. This does makes it easier to customise it if necessary.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jul 8 05:26:45 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.12: +2 -13 lines
Diff to previous 1.12 (colored)

Just appending -l to $SHELL to create a login shell is wrong: -l is not POSIX,
and some people may use shells which do not support it. Instead, make an empty
default-command option mean a login shell, and fork it with a - in argv[0]
which is the method used by login(1).

Also fix the automatic-rename code to handle this correctly and to strip a
leading - if present.

Revision 1.12 / (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.11: +52 -53 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Thu Jun 25 06:54:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.10: +6 -3 lines
Diff to previous 1.10 (colored)

If getcwd() fails, use the user's home directory, or /, instead of failing with
an error.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jun 25 06:40:25 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.9: +1 -9 lines
Diff to previous 1.9 (colored)

Remove error about using -L and -S together which was never displayed as
logging wasn't yet enabled, was unnecessary, and contradicted the man page
which says using -S will cause -L to be ignored.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jun 23 18:27:40 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

LC_ALL overrides LC_CTYPE and LANG. Comment was correct but the code
wrong. Pointed out by Hannah Schroeter, thanks.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 5 07:22:23 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.7: +8 -3 lines
Diff to previous 1.7 (colored)

Check the first of LC_CTYPE, LC_ALL and LANG, rather than just the last, when
trying to decide about UTF-8, and use strcasestr. Reported by Geert Hendrickx.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jun 4 21:56:14 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

Zero the password given to -U in the client as well.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 3 17:04:16 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Do not set the window title by default (make set-titles option default to off),
wiping over the title is rude and annoying. Agreed by several.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 3 16:54:26 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

New session option, status-utf8, to control the interpretation of top-bit-set
characters in status-left and status-right (if on, they are treated as UTF-8;
otherwise passed through).

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jun 2 16:53:20 2009 UTC (14 years, 11 months ago) by sobrado
Branch: MAIN
Changes since 1.3: +4 -3 lines
Diff to previous 1.3 (colored)

remove unused flag; while here, make usage's output fit on 80-column displays.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 2 15:55:32 2009 UTC (14 years, 11 months ago) by pyr
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

spawn login shells by default, adapt manpage bits as well.
ok nicm@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 2 10:49:40 2009 UTC (14 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

Don't leak memory if multiple -f flags are given.

OK nicm@

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

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.