Hi Sorry for the delay, overlooked this one.
I think I'd prefer just a numeric flag rather than auto, what about this (not tested)? Not wild about setting a flag on each command but I think putting it on the cmdq wouldn't work. Index: cmd-queue.c =================================================================== RCS file: /cvs/src/usr.bin/tmux/cmd-queue.c,v retrieving revision 1.8 diff -u -p -r1.8 cmd-queue.c --- cmd-queue.c 10 Apr 2013 12:15:36 -0000 1.8 +++ cmd-queue.c 31 May 2013 11:53:25 -0000 @@ -157,14 +157,17 @@ int cmdq_guard(struct cmd_q *cmdq, const char *guard) { struct client *c = cmdq->client; + int flags; if (c == NULL) return 0; if (!(c->flags & CLIENT_CONTROL)) return 0; - evbuffer_add_printf(c->stdout_data, "%%%s %ld %u\n", guard, - (long) cmdq->time, cmdq->number); + flags = !!(cmdq->cmd->flags & CMD_CONTROL); + + evbuffer_add_printf(c->stdout_data, "%%%s %ld %u %d\n", guard, + (long) cmdq->time, cmdq->number, flags); server_push_stdout(c); return 1; } Index: control.c =================================================================== RCS file: /cvs/src/usr.bin/tmux/control.c,v retrieving revision 1.10 diff -u -p -r1.10 control.c --- control.c 26 Mar 2013 10:54:48 -0000 1.10 +++ control.c 31 May 2013 11:51:23 -0000 @@ -55,6 +55,7 @@ control_callback(struct client *c, int c { char *line, *cause; struct cmd_list *cmdlist; + struct cmd *cmd; if (closed) c->flags |= CLIENT_EXIT; @@ -78,6 +79,8 @@ control_callback(struct client *c, int c free(cause); } else { + TAILQ_FOREACH(cmd, &cmdlist->list, qentry) + cmd->flags |= CMD_CONTROL; cmdq_run(c->cmdq, cmdlist); cmd_list_free(cmdlist); } Index: tmux.h =================================================================== RCS file: /cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.409 diff -u -p -r1.409 tmux.h --- tmux.h 24 Apr 2013 10:01:32 -0000 1.409 +++ tmux.h 31 May 2013 11:51:11 -0000 @@ -1378,6 +1378,9 @@ struct cmd { char *file; u_int line; +#define CMD_CONTROL 0x1 + int flags; + TAILQ_ENTRY(cmd) qentry; }; struct cmd_list { On Fri, Apr 19, 2013 at 04:12:59PM -0700, George Nachman wrote: > When command mode is begun, new-session (or a command given on the command > line) is run automatically. Although the control client did not initiate > the command, it receives its output. The "extra" %begin-%end block throws > the client off. This changes modifies the %begin guard for commands not > initiated by a client to "%begin auto". > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users