Commit Graph

25 Commits (5aa28473dd76c6c10c5e2e9d303250c8f8881e05)

Author SHA1 Message Date
Tiago Cunha 391f1f08c0 Expand the Id keyword. 2011-07-09 09:42:33 +00:00
Nicholas Marriott e5f4bf3f3e |PatchSet 884
|Date: 2011/04/06 22:51:31
|Author: nicm
|Branch: HEAD
|Tag: (none)
|Log:
|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.
2011-04-06 22:29:26 +00:00
Nicholas Marriott 4e452a2e11 |PatchSet 882
|Date: 2011/04/05 20:37:01
|Author: nicm
|Branch: HEAD
|Tag: (none)
|Log:
|Add a flag to cmd_find_session so that attach-session can prefer
|unattached sessions when choosing the most recently used (if -t is not
|given). Suggested by claudio@.
2011-04-06 22:24:01 +00:00
Tiago Cunha 1df427bc7b Sync OpenBSD patchset 829:
Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server to be executed. The parsing was later moved into the server (an
argv was sent from the client), but the parse step and intermediate
struct was kept.

This change removes that struct and the separate parse step. Argument
parsing and printing is now common to all commands (in arguments.c) with
each command left with just an optional check function (to validate the
arguments at parse time), the exec function and a function to set up any
key bindings (renamed from the old init function).

This is overall more simple and consistent.

There should be no changes to any commands behaviour or syntax although
as this touches every command please watch for any unexpected changes.
2011-01-07 14:45:34 +00:00
Tiago Cunha a373235106 Sync OpenBSD patchset 806:
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.
2010-12-22 15:36:44 +00:00
Tiago Cunha c50c4ec834 Sync OpenBSD patchset 749:
Do not allow duplicate session names to be created, reported by Dominik
Honnef, patch from Thomas Adam.
2010-08-11 22:19:03 +00:00
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 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 1919deab1f Redraw the status line after renaming a session (it may contain the name). 2009-07-12 17:09:15 +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 78c96751e6 Rename some flags I'm not happy about. 2009-01-14 22:16:57 +00:00
Nicholas Marriott 5c3d973a4a Import OpenBSD's getopt(3) to workaround broken glibc version. 2008-12-10 20:25:42 +00:00
Nicholas Marriott 99df48d70f Trimify. 2008-06-18 22:21:51 +00:00
Nicholas Marriott 0b9b873a55 Big reorganisation of command-line syntax. 2008-06-05 21:25:00 +00:00
Nicholas Marriott ee1a7fded7 Print for the less easy commands. 2008-06-05 17:12:11 +00:00
Nicholas Marriott 642c0b00ab Easy bits of arg printing for list-keys. 2008-06-05 16:35:32 +00:00
Nicholas Marriott 743956edf8 Allow -c anywhere -s was allowed. 2008-06-03 16:55:09 +00:00
Nicholas Marriott f91e7bfd38 If no command is specified, assume new-session. 2008-06-03 05:35:51 +00:00
Nicholas Marriott a26f58c7c3 Last bits of basic configuration file. By default in ~/.tmux.conf or specified with -f. Just a list of tmux commands executed when the server is started and before and any session/window is created. 2008-06-02 21:08:36 +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 103748d6ad Major reorganisation of screen handling. 2007-12-06 09:46:23 +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 16321270c8 rename-session command. 2007-11-09 11:02:01 +00:00