Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-26 Thread Thomas Adam
Hi, On Mon, Nov 26, 2012 at 02:35:30PM +, Philip Herron wrote: > Just a quick poke has add-hook support been merged into git master? Not yet. I'm still working on some changes. Subscribe to the tmux-cvs mailing list to get notifications on updates to the portable tmux version. -- Thomas Ad

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-26 Thread Philip Herron
Just a quick poke has add-hook support been merged into git master? --Phil On 21 November 2012 18:01, Nicholas Marriott wrote: > Hi > > This seems a reasonable idea to me but I think it should go in cmd_ctx - > it is context for THIS invocation of the command, not for all > invocations. I'd just

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-21 Thread Nicholas Marriott
Hi This seems a reasonable idea to me but I think it should go in cmd_ctx - it is context for THIS invocation of the command, not for all invocations. I'd just add it as members in there personally. Also I'd maybe call the function prepare() or parse() not context()? Also of course exec() can as

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-19 Thread Thomas Adam
On Mon, Nov 19, 2012 at 10:32:00AM +, Nicholas Marriott wrote: > Hi > > Not sure I follow, can you show me your code? See "hook-context.diff" attached. Please ignore any whitespace errors, as well as any logging since I'm still in the throws of messing with things. You should look (in that

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-19 Thread Nicholas Marriott
Hi Not sure I follow, can you show me your code? I think check() was meant for parse time so that eg bind-key could reject stuff when a key was bound rather when it was pressed, but since it is hardly used I'm fine with removing it. Note that bind/unbind use it as well as new-session. On Mon, N

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-18 Thread Thomas Adam
Hi, [ I've not forgotten about this, in case anyone was wondering. ] On Tue, Nov 06, 2012 at 12:48:54PM +, Nicholas Marriott wrote: > On Sun, Nov 04, 2012 at 01:22:50AM +, Thomas Adam wrote: > > To "fix" this, we would need to change where and how hooks are run from, > > much like the

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-08 Thread Nicholas Marriott
On Thu, Nov 08, 2012 at 04:33:37AM +, Ben Boeckel wrote: > On Sun, Nov 04, 2012 at 01:22:50 GMT, Thomas Adam wrote: > > I'm attaching one patch for now -- an idea for how hook support in tmux > > might work. There's no documentation yet as I envisage things still in a > > state of flux. > > N

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-08 Thread Thomas Adam
On Thu, Nov 08, 2012 at 04:33:37AM +, Ben Boeckel wrote: > Could a `-w` flag for 'when' the hook is to be called could be done > instead of embedding it into the name? I'd also prefer pre/post over > before/after, but it's not a big deal. I don't care about the name, but I think before/after i

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-07 Thread Ben Boeckel
On Sun, Nov 04, 2012 at 01:22:50 GMT, Thomas Adam wrote: > I'm attaching one patch for now -- an idea for how hook support in tmux > might work. There's no documentation yet as I envisage things still in a > state of flux. Nice :) . > All commands that tmux recognise have the ability to have hoo

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-06 Thread shawn wilson
as i think was mentioned, a variable with session information would really make this most useful. my particular use case is: i'd like bell-action to send a desktop-notify message with the last x characters of the session that caused the bell. with this, i could get the notification, but can't tell

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-06 Thread Thomas Adam
Hi, On Tue, Nov 06, 2012 at 12:48:54PM +, Nicholas Marriott wrote: > On Sun, Nov 04, 2012 at 01:22:50AM +, Thomas Adam wrote: > > * The hook-name matters; at the moment the implementation assumes > > cmd->entry->name and NOT cmd->entry->alias -- should both be checked? > > That might m

Re: [PATCH 0/1] Hook support: proof-of-concept

2012-11-06 Thread Nicholas Marriott
On Sun, Nov 04, 2012 at 01:22:50AM +, Thomas Adam wrote: > Hi, > > I'm attaching one patch for now -- an idea for how hook support in tmux > might work. There's no documentation yet as I envisage things still in a > state of flux. > > All commands that tmux recognise have the ability to have

[PATCH 0/1] Hook support: proof-of-concept

2012-11-03 Thread Thomas Adam
Hi, I'm attaching one patch for now -- an idea for how hook support in tmux might work. There's no documentation yet as I envisage things still in a state of flux. All commands that tmux recognise have the ability to have hooks attached to them. These hooks in turn can run other tmux commands