Commit Graph

24 Commits (653d1e2fc80a4eca4f819b31bacd7119038276d6)

Author SHA1 Message Date
Tiago Cunha 87a2a13f68 Sync OpenBSD patchset 946:
Add a -r flag to switch-client to toggle the client read-only flag. From
Johan Commelin.
2011-08-21 12:38:55 +00:00
Tiago Cunha 391f1f08c0 Expand the Id keyword. 2011-07-09 09:42:33 +00:00
Nicholas Marriott 34a331aa99 |PatchSet 891
|Date: 2011/04/17 20:28:09
|Author: nicm
|Branch: HEAD
|Tag: (none)
|Log:
|Add -t to list-clients, based on a diff from Zac Sprackett.
2011-04-18 21:07:12 +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 c12e0b0708 Sync OpenBSD patchset 567:
Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.
2009-11-28 14:50:37 +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 bb459beb03 Whitespace and more syncing. 2009-06-25 16:34:50 +00:00
Nicholas Marriott cdce5f739d Indentation. 2009-05-19 16:29:35 +00:00
Nicholas Marriott 6db7bd6791 Try to guess if the window is UTF-8 by outputting a three-byte UTF-8 wide character and seeing how much the cursor moves. Currently tries to figure out if this works by some stupid checks on the terminal, these need to be rethought. Also might be better using a width 1 character rather than width 2. 2009-05-19 16:08:35 +00:00
Nicholas Marriott 03d531ebc6 Move sx,sy into tty rather than client. 2009-02-11 17:50:36 +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 fb6c8ecae6 New command, server-info, to show server info + terminal details. Also tweak term stuff a bit. 2009-01-10 01:30:38 +00:00
Nicholas Marriott ed1031b358 Update key handling code. Simplify, support ctrl properly and add a new window option (xterm-keys) to output xterm key codes including ctrl and, if available, alt and shift. 2009-01-09 16:45:58 +00:00
Nicholas Marriott c980360cb5 +. 2009-01-07 20:11:51 +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 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 76c8a590db Big internal reorganisation to move tty control into parent. 2007-11-27 19:23:34 +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 25e94a0526 List client command. 2007-10-23 09:36:19 +00:00