Commit Graph

14 Commits (39abca401af428b62bdaa0539dcdb6df6bfc2afd)

Author SHA1 Message Date
Nicholas Marriott 39abca401a Trim a blank line. 2012-06-25 13:49:16 +00:00
Nicholas Marriott ebf94bc9cb Switch all of the various choose- and list- commands over to the format
infrastructure, from Thomas Adam.
2012-05-22 11:35:37 +00:00
Nicholas Marriott c829bdf537 Minor style nits - return (). 2012-04-01 20:53:47 +00:00
Nicholas Marriott cd8e536c43 Only find each window once no matter how many panes, from Jonathan
Daugherty.
2012-04-01 08:10:56 +00:00
Nicholas Marriott b1e4b8769b Remove a stale comment. 2012-03-20 23:20:08 +00:00
Nicholas Marriott 90bf560fe4 Add -C -N -T flags to find-window to find in content, name, title. From
Jonathan Daugherty.
2012-03-20 17:09:48 +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 a51dcdc430 Unify the way sessions are used by callbacks - store the address and use
the reference count, then check it is still on the global sessions list
in the callback.
2010-12-20 00:03:55 +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 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 216df07688 A similar for fix for window_choose: don't rely on the callback always being
called to free data, have a separate free callback and call it from the mode
cleanup code.
2009-07-17 07:05:58 +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 7e796dea03 Change find-window and monitor-content to use fnmatch(3). For convenience and
compatibility, *s are implicitly added at the start and end of the pattern.

Also display the line number and the entire line in the results, and lose the
nasty section_string function and the now empty util.c file.

Initially from Tiago Cunha.
2009-06-24 22:49:56 +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