Commit Graph

29 Commits (63e76b555d8f3d40f9905fb65a58f6e7509d399d)

Author SHA1 Message Date
Tiago Cunha 03c1c1cd9f Sync OpenBSD patchset 727:
Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed
after the command is executing is bogus because it may still be needed if the
same command is going to be executed again (for example if you "bind-key a
bind-key b ..."). Making a copy is hard, so instead add a reference count to
the cmd_list.

While here, also print bind-key -n and the rest of the flags properly.

Fixes problem reported by mcbride@.
2010-07-02 02:43:01 +00:00
Tiago Cunha c744964cd9 Sync OpenBSD patchset 614:
Don't leak if arguments appear multiple times, from Tiago Cunha.
2010-01-25 17:12:44 +00:00
Tiago Cunha 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
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 522fc94d12 Sync OpenBSD patchset 194:
Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t
argument to modify a table.
2009-07-28 23:19:06 +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
Tiago Cunha 28cf7dc39e Sync OpenBSD patchset 175:
Permit commands to be bound to key presses without the prefix key first. The
new -n flag to bind-key and unbind-key sets or removes these bindings, and
list-key shows them in []s.
2009-07-25 08:52:04 +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 143aa718e5 Space trimmage mega-diff. 2009-05-04 17:58:27 +00:00
Nicholas Marriott cb2ac5c269 Key repeating is now a property of the key binding not of the command. Repeat
is turned on when the key is bound with the -r flag to bind-key. next/previous-
window no longer repeat by default as it turned out to annoy me.
2009-03-28 14:08:09 +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 a15f8fc4a6 Support command sequences separated by " ; ". Also clean up command printing. 2009-01-18 14:40:48 +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 df2b3bcf44 Fix stupid GNU getopt behaviour. 2008-09-25 23:28:15 +00:00
Nicholas Marriott 741f8967b4 Final missing print function. 2008-06-05 21:54:47 +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 8731755ab4 Add a windowonly generic command and use it where appropriate. Also trim includes and unused. 2008-06-02 22:09:49 +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 94f003bbec Refresh session command. 2007-10-19 09:21:26 +00:00
Nicholas Marriott 26b340964a Lose command index enum in favour of runtime-calculated index. 2007-10-04 22:04:01 +00:00
Nicholas Marriott 75e1e4b91e Lose usage and move it into the struct. 2007-10-04 21:48:11 +00:00
Nicholas Marriott 57157a1cde set-option command to set meta. 2007-10-04 10:11:32 +00:00
Nicholas Marriott 774b556669 Key binding and unbinding. 2007-10-04 09:30:53 +00:00