[PATCH V3 1/3] Define hooks infrasructure

2013-04-14 Thread Thomas Adam
This adds an implementation hooks using a RB tree to store the name of the hook and the command-list it uses. These will be accessed via commands to add/remove hooks. --- Makefile.am | 3 ++ cmd-set-hook.c | 98 + cmd-show-hooks.c | 69 ++

[PATCH V3 0/3] Hook support

2013-04-14 Thread Thomas Adam
Hi, Here's V3 of hook support for commands. Compared to V2, I've done the following: * Grouped together header includes to remove blank lines (I hope :P); * Removed extraneous tab characters from prepare() for struct assignments; * Made error messages not use capitalisation on first word or add

[PATCH V3 3/3] Add man page entry for hooks

2013-04-14 Thread Thomas Adam
This defines a generic HOOKS section, describing a little bit about hooks as well as the two hooks-specific commands to manipulate/show them. --- tmux.1 | 79 ++ 1 file changed, 79 insertions(+) diff --git a/tmux.1 b/tmux.1 index 98b

Re: [PATCH V2 1/3] Define hooks infrasructure

2013-04-14 Thread Thomas Adam
Hi, On Sun, Apr 14, 2013 at 06:15:25PM +0100, Nicholas Marriott wrote: > Let nitpicking commence! > > Apart from nitpicks this looks good, will look at the other diffs a bit > later. Thanks. Please see the V3 round of this, including man page entry. -- Thomas Adam

Re: [PATCH V2 3/3] Define on-bell hook.

2013-04-14 Thread Nicholas Marriott
Comment inline. On Sun, Apr 14, 2013 at 05:01:38PM +0100, Thomas Adam wrote: > This allows for hooks to run when a bell is sounded by tmux. > --- > server-window.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/server-window.c b/server-window.c > index 4f5a5

Re: [PATCH V2 1/3] Define hooks infrasructure

2013-04-14 Thread Nicholas Marriott
Let nitpicking commence! Apart from nitpicks this looks good, will look at the other diffs a bit later. On Sun, Apr 14, 2013 at 05:01:36PM +0100, Thomas Adam wrote: > This adds an implementation hooks using a RB tree to store the name of the > hook and the command-list it uses. These will be acc

[PATCH V2 1/3] Define hooks infrasructure

2013-04-14 Thread Thomas Adam
This adds an implementation hooks using a RB tree to store the name of the hook and the command-list it uses. These will be accessed via commands to add/remove hooks. --- Makefile.am | 3 ++ cmd-set-hook.c | 100 ++ cmd-show-hooks.c | 71 +

[PATCH V2 3/3] Define on-bell hook.

2013-04-14 Thread Thomas Adam
This allows for hooks to run when a bell is sounded by tmux. --- server-window.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server-window.c b/server-window.c index 4f5a550..99c25eb 100644 --- a/server-window.c +++ b/server-window.c @@ -88,7 +88,7 @@ server_wind

[PATCH V2 0/3] Hook support

2013-04-14 Thread Thomas Adam
Hi, This is V2 of the hook support patches from before. Hopefully I've addressed all of the feedback points, Nicholas. I'm expecting nit-picking to take place now. :) Not many functional changes from the original patches -- a bug fix or two perhaps. I've also added a special "on-bell" hook wh