Commit Graph

27 Commits

Author SHA1 Message Date
391f1f08c0 Expand the Id keyword. 2011-07-09 09:42:33 +00:00
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
f11f71752a Pass in the session, rather than the client, to window modes' key() function.
We were only ever using the client to find the session anyway.
2010-05-22 21:56:04 +00:00
cc094fdfe6 Sync OpenBSD patchset 581:
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...
2009-12-04 22:14:47 +00:00
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
480211f0ee Sync OpenBSD patchset 341:
Nuke -i option which isn't used anymore.
2009-09-22 14:03:11 +00:00
36475f80e9 Sync OpenBSD patchset 271:
Now that pane targets (-t) are supported, switch some commands to use them
where it makes sense: clock-mode, copy-mode, scroll-mode, send-keys,
send-prefix.
2009-08-20 11:37:46 +00:00
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
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
93230a64bc Pass return code from _exec; allow command sequences to work from the command line. 2009-01-19 18:23:40 +00:00
a15f8fc4a6 Support command sequences separated by " ; ". Also clean up command printing. 2009-01-18 14:40:48 +00:00
162bacdcd9 Window splitting. Two vertical panes fixed 50% each. This is a huge diff, still a couple of bugs (notably heap corruption somewhere causing segfault on exit). 2009-01-11 23:31:46 +00:00
5c3d973a4a Import OpenBSD's getopt(3) to workaround broken glibc version. 2008-12-10 20:25:42 +00:00
df2b3bcf44 Fix stupid GNU getopt behaviour. 2008-09-25 23:28:15 +00:00
4e4f71febb Swap in new paste buffer code and add a couple more commands. 2008-06-20 17:31:48 +00:00
30573a6ace Fix usage, from Will Maier. 2008-06-10 20:28:42 +00:00
741f8967b4 Final missing print function. 2008-06-05 21:54:47 +00:00
0b9b873a55 Big reorganisation of command-line syntax. 2008-06-05 21:25:00 +00:00
ee1a7fded7 Print for the less easy commands. 2008-06-05 17:12:11 +00:00
642c0b00ab Easy bits of arg printing for list-keys. 2008-06-05 16:35:32 +00:00
743956edf8 Allow -c anywhere -s was allowed. 2008-06-03 16:55:09 +00:00
f91e7bfd38 If no command is specified, assume new-session. 2008-06-03 05:35:51 +00:00
eaee4dc800 Quick and dirty kill-server command. 2008-06-03 05:10:38 +00:00
95cc21c251 Quick man page update, also fix some usages and get rid of some CMD_KEY checks. 2008-06-02 21:36:51 +00:00
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
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
65f4284e7f New command, send-keys, to send a set of keys. 2008-06-01 20:20:25 +00:00