[BACK]Return to cmd-set-hook.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/Attic/cmd-set-hook.c between version 1.5 and 1.6

version 1.5, 2015/12/14 00:31:54 version 1.6, 2016/05/12 13:21:56
Line 36 
Line 36 
         .args = { "gt:u", 1, 2 },          .args = { "gt:u", 1, 2 },
         .usage = "[-gu] " CMD_TARGET_SESSION_USAGE " hook-name [command]",          .usage = "[-gu] " CMD_TARGET_SESSION_USAGE " hook-name [command]",
   
         .tflag = CMD_SESSION,          .tflag = CMD_SESSION_CANFAIL,
   
         .flags = 0,          .flags = 0,
         .exec = cmd_set_hook_exec          .exec = cmd_set_hook_exec
Line 63 
Line 63 
         struct hooks    *hooks;          struct hooks    *hooks;
         struct hook     *hook;          struct hook     *hook;
         char            *cause, *tmp;          char            *cause, *tmp;
         const char      *name, *cmd;          const char      *name, *cmd, *target;
   
         if (args_has(args, 'g'))          if (args_has(args, 'g'))
                 hooks = global_hooks;                  hooks = global_hooks;
         else          else {
                   if (cmdq->state.tflag.s == NULL) {
                           target = args_get(args, 't');
                           if (target != NULL)
                                   cmdq_error(cmdq, "no such session: %s", target);
                           else
                                   cmdq_error(cmdq, "no current session");
                           return (CMD_RETURN_ERROR);
                   }
                 hooks = cmdq->state.tflag.s->hooks;                  hooks = cmdq->state.tflag.s->hooks;
           }
   
         if (self->entry == &cmd_show_hooks_entry) {          if (self->entry == &cmd_show_hooks_entry) {
                 hook = hooks_first(hooks);                  hook = hooks_first(hooks);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6