Commit Graph

11 Commits (df912e3540968a2a0b266e523ecc08bb2dc0ca20)

Author SHA1 Message Date
Nicholas Marriott 63d109fb7f Use RB_FOREACH_SAFE as winlinks are being removed, from Chris Johnsen. 2012-05-29 08:12:13 +00:00
Nicholas Marriott 226f9fa012 Use session from -t for killw -a, from Chris Johnsen. 2012-05-29 08:11:34 +00:00
Nicholas Marriott ed58b2d353 Add -a flag to kill-window, from Thomas Adam. 2012-04-23 22:10:45 +00:00
Nicholas Marriott 7502cb3adb 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-04 00:42:46 +00:00
Nicholas Marriott 76ef8770cd 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-13 19:53:28 +00:00
Nicholas Marriott 9b5f5ed8e8 Move some common and untidy code for window link/unlink into generic functions
instead of duplicating it in move/link window..
2009-09-20 17:27:18 +00:00
Nicholas Marriott 34a82e7629 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-26 12:58:44 +00:00
Nicholas Marriott 0ca6f667e3 Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.
2009-07-17 20:37:03 +00:00
Nicholas Marriott 9601b72e4c The man page says that kill-window removes the window entirely, unlinking it
from any sessions. In fact the implementation only affected the current
session, making it the same as unlink-window but destroying the window if it
was linked into only one session (unlinkw gives an error). Change the behaviour
to match what it documented and was originally intended.
2009-07-15 08:00:49 +00:00
Nicholas Marriott 5f108d9df6 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-13 23:11:35 +00:00
Nicholas Marriott 35876eaab9 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
2009-06-01 22:58:49 +00:00