=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/format.c,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- src/usr.bin/tmux/format.c 2016/01/31 09:54:46 1.105 +++ src/usr.bin/tmux/format.c 2016/04/29 14:05:24 1.106 @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.105 2016/01/31 09:54:46 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.106 2016/04/29 14:05:24 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -468,6 +468,7 @@ format_create(struct cmd_q *cmdq, int flags) { struct format_tree *ft; + struct cmd *cmd; if (!event_initialized(&format_job_event)) { evtimer_set(&format_job_event, format_job_timer, NULL); @@ -486,6 +487,10 @@ if (cmdq != NULL && cmdq->cmd != NULL) format_add(ft, "command_name", "%s", cmdq->cmd->entry->name); + if (cmdq != NULL && cmdq->parent != NULL) { + cmd = cmdq->parent->cmd; + format_add(ft, "command_hooked", "%s", cmd->entry->name); + } return (ft); }