Commit Graph

34 Commits

Author SHA1 Message Date
Tiago Cunha
d15e88cb68 Sync OpenBSD patchset 299:
Initialise the arg2 pointer properly (also free it when freeing the
others). Fixes crashes with J in malloc_options reported by oga.
2009-08-26 22:13:52 +00:00
Nicholas Marriott
304296972b Sync from OpenBSD:
Add flags for 1+2 and 2 arguments to the generic target code, use it for
cmd-set-environment/option/window-option and remove the generic options
parsing.
2009-08-11 14:42:59 +00:00
Tiago Cunha
1650b8552f Sync OpenBSD patchset 200:
Merge pane number into the target specification for pane commands. Instead of
using -p index, a target pane is now addressed with the normal -t window form
but suffixed with a period and a pane index, for example :0.2 or
mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in
the current window, if that fails the same rules are followed as for a target
window and the current pane in that window used.

As a side-effect this now means that swap-pane can swap panes between
different windows.

Note that this changes the syntax of the break-pane, clear-history, kill-pane,
resize-pane, select-pane and swap-pane commands.
2009-07-30 20:45:20 +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
27fc963631 When pasting, translate \n into \r. This matches xterm and putty's behaviour,
and makes emacs happy when pasting into some modes. A new -r (raw) flag to
paste-buffer pastes without the translation.

From Kalle Olavi Niemitalo, thanks!
2009-07-12 17:11:39 +00:00
Nicholas Marriott
89404788c9 Spacing. 2009-05-21 19:47:57 +00:00
Nicholas Marriott
6c442c19ba UPPER -> BIG, sort, and bump protocol version. 2009-05-21 19:46:00 +00:00
Nicholas Marriott
143aa718e5 Space trimmage mega-diff. 2009-05-04 17:58:27 +00:00
Nicholas Marriott
9be1cb5b2f A flag missed. 2009-04-03 17:31:44 +00:00
Nicholas Marriott
325d43e417 rotate-window command. 2009-04-03 17:21:46 +00:00
Nicholas Marriott
7dab6f3e96 Add -a properly. 2009-01-23 20:20:23 +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
78c96751e6 Rename some flags I'm not happy about. 2009-01-14 22:16:57 +00:00
Nicholas Marriott
c35a50b21a Commands to resize panes; also a pane generic cmd, not used yet. 2009-01-12 19:23:14 +00:00
Nicholas Marriott
d78bc5dfc4 save-buffer command, from Tiago Cunha. 2009-01-11 23:14:57 +00:00
Nicholas Marriott
30746a4e92 Doh. Return the offset not the total. 2009-01-11 23:05:36 +00:00
Nicholas Marriott
a1b43faa43 Trim spaces. 2009-01-10 01:51:22 +00:00
Nicholas Marriott
18312fa6fd Some options tidying/code shrinkage. Also add -u option to unset non-global options (allowing them to inherit), and some extra info. 2009-01-07 19:53:17 +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
7a82e86827 Make window options work the same was as session options, add mode-fg/mode-bg options, force -g for global on set/show/setw/showw/ 2008-12-08 16:19:51 +00:00
Nicholas Marriott
df2b3bcf44 Fix stupid GNU getopt behaviour. 2008-09-25 23:28:15 +00:00
Nicholas Marriott
d90d646ca8 Zombie windows, requested by Will Maier. 2008-06-29 07:04:31 +00:00
Nicholas Marriott
9798dcd4df Start of improved buffer code. Only set-buffer/show-buffer commands so far. 2008-06-20 08:36:20 +00:00
Nicholas Marriott
99df48d70f Trimify. 2008-06-18 22:21:51 +00:00
Nicholas Marriott
15514592f9 Don't use entry init since it may be dependent on key. 2008-06-05 23:17:03 +00:00
Nicholas Marriott
0b9b873a55 Big reorganisation of command-line syntax. 2008-06-05 21:25:00 +00:00
Nicholas Marriott
ee1a7fded7 Print for the less easy commands. 2008-06-05 17:12:11 +00:00
Nicholas Marriott
642c0b00ab Easy bits of arg printing for list-keys. 2008-06-05 16:35:32 +00:00
Nicholas Marriott
f7ba4dfdc9 Bring select-window into line with everything else wrt -i. 2008-06-04 16:11:53 +00:00
Nicholas Marriott
743956edf8 Allow -c anywhere -s was allowed. 2008-06-03 16:55:09 +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