[PATCH V5 3/3] Commands: Make use of prepare

2015-01-27 Thread Thomas Adam
Switch over all tmux commands to make use of prepare. --- cmd-attach-session.c | 11 +++--- cmd-bind-key.c | 3 ++- cmd-break-pane.c | 9 +--- cmd-capture-pane.c | 7 +++--- cmd-choose-buffer.c| 9 cmd-choose-client.c| 10 + cmd-choose-tree.

[PATCH V5 0/3] Hook support

2015-01-27 Thread Thomas Adam
Hi, So it's been a while. Here's an updated version of hook support. For those of you wanting to play along at home, please see: https://github.com/ThomasAdam/tmux/tree/ta/new-hooks Some of it might still be rough around the edges; I'm planning on ironing that out over the next few days. Sinc

[PATCH V5 2/3] Add hooks infrastructure

2015-01-27 Thread Thomas Adam
Define a structure for holding hook information, as well as set/show hook commands. --- Makefile.am | 3 ++ cmd-set-hook.c | 95 ++ cmd-show-hooks.c | 62 ++ cmd.c| 2 + hooks.c | 112

[PATCH V5 1/3] Introduce prepare mechanism for commands

2015-01-27 Thread Thomas Adam
Commands now set their running context separately from executing. The state is used at execution time of commands, and by separating this out, the command state can be queried for any hooked commands. --- cmd.c | 32 tmux.h | 32