Commit Graph

24 Commits

Author SHA1 Message Date
Tiago Cunha
e35f5b35bd Sync OpenBSD patchset 539:
Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the
command entry structs and a couple of functions to check/set the flags.
2009-11-14 17:56:39 +00:00
Tiago Cunha
bbad75fb6c Sync OpenBSD patchset 483:
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.
2009-11-04 22:42:31 +00:00
Tiago Cunha
6a1ebb11df Sync OpenBSD patchset 371:
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.
2009-10-11 23:38:16 +00:00
Tiago Cunha
d637cb33da Sync OpenBSD patchset 181:
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.
2009-07-28 22:12:16 +00:00
Nicholas Marriott
097b96ea44 Having fixed flags for single-character getopt options is a bit hard to
maintain and is only going to get worse as more are used. So instead, add a new
uint64_t member to cmd_entry which is a bitmask of upper and lowercase options
accepted by the command.

This means new single character options can be used without the need to add it
explicitly to the list.
2009-07-14 06:43:33 +00:00
Nicholas Marriott
93230a64bc Pass return code from _exec; allow command sequences to work from the command line. 2009-01-19 18:23:40 +00:00
Nicholas Marriott
efb62d423b Show (attached) for attached sessions. 2009-01-18 12:13:21 +00:00
Nicholas Marriott
fd05d07c2b Change server-info format. 2009-01-10 14:43:43 +00:00
Nicholas Marriott
33aa931541 Support OS X by moving to gettimeofday(2) and adding poll compat from OpenSSH. 2008-08-28 17:45:30 +00:00
Nicholas Marriott
0b9b873a55 Big reorganisation of command-line syntax. 2008-06-05 21:25:00 +00:00
Nicholas Marriott
642c0b00ab Easy bits of arg printing for list-keys. 2008-06-05 16:35:32 +00:00
Nicholas Marriott
73c9b25d2d It is too easy to create things in the same second; use a timespec instead. 2008-06-03 18:13:54 +00:00
Nicholas Marriott
f91e7bfd38 If no command is specified, assume new-session. 2008-06-03 05:35:51 +00:00
Nicholas Marriott
eaee4dc800 Quick and dirty kill-server command. 2008-06-03 05:10:38 +00:00
Nicholas Marriott
c7243b73cb Move -s and -c down a level so handling them is the responsibility of the command (with some helper functions), rather than the top-level. This changes the action command syntax so that -s and -c must be after the command rather than before. 2008-06-02 18:08:17 +00:00
Nicholas Marriott
b359f9b594 Add -c option to specify client, and move detach/refresh to client rather than session. 2007-11-16 21:12:31 +00:00
Nicholas Marriott
7e3cc5fd12 Use ctx->client/ctx->session inline instead of temporary variables which were
being reused and causing confusion and problems.
2007-11-13 09:53:47 +00:00
Nicholas Marriott
4ba3cf60be Reorg window data structures. Add an intermediate data type (struct winlink) to hold index and make sessions hold a RB tree of them rather than a fixed array. 2007-10-26 12:29:07 +00:00
Nicholas Marriott
98e7e79e4c Show size. 2007-10-23 09:36:07 +00:00
Nicholas Marriott
d544d5915d time.h. 2007-10-19 22:32:54 +00:00
Nicholas Marriott
26b340964a Lose command index enum in favour of runtime-calculated index. 2007-10-04 22:04:01 +00:00
Nicholas Marriott
75e1e4b91e Lose usage and move it into the struct. 2007-10-04 21:48:11 +00:00
Nicholas Marriott
815815989a Next/last/previous window, some other tweaks. 2007-10-04 00:02:10 +00:00
Nicholas Marriott
df716ecc8f Rewrite command handling to be more generic. Not finished! 2007-10-03 21:31:07 +00:00