summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-set-hook.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-set-hook.c')
-rw-r--r--usr.bin/tmux/cmd-set-hook.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-set-hook.c b/usr.bin/tmux/cmd-set-hook.c
index 87e1642a6a2..6d6ac127321 100644
--- a/usr.bin/tmux/cmd-set-hook.c
+++ b/usr.bin/tmux/cmd-set-hook.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-hook.c,v 1.10 2017/01/15 22:00:56 nicm Exp $ */
+/* $OpenBSD: cmd-set-hook.c,v 1.11 2017/04/22 10:22:39 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -36,7 +36,7 @@ const struct cmd_entry cmd_set_hook_entry = {
.args = { "gt:u", 1, 2 },
.usage = "[-gu] " CMD_TARGET_SESSION_USAGE " hook-name [command]",
- .tflag = CMD_SESSION_CANFAIL,
+ .target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL },
.flags = CMD_AFTERHOOK,
.exec = cmd_set_hook_exec
@@ -49,7 +49,7 @@ const struct cmd_entry cmd_show_hooks_entry = {
.args = { "gt:", 0, 1 },
.usage = "[-g] " CMD_TARGET_SESSION_USAGE,
- .tflag = CMD_SESSION,
+ .target = { 't', CMD_FIND_SESSION, 0 },
.flags = CMD_AFTERHOOK,
.exec = cmd_set_hook_exec
@@ -68,7 +68,7 @@ cmd_set_hook_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'g'))
hooks = global_hooks;
else {
- if (item->state.tflag.s == NULL) {
+ if (item->target.s == NULL) {
target = args_get(args, 't');
if (target != NULL)
cmdq_error(item, "no such session: %s", target);
@@ -76,7 +76,7 @@ cmd_set_hook_exec(struct cmd *self, struct cmdq_item *item)
cmdq_error(item, "no current session");
return (CMD_RETURN_ERROR);
}
- hooks = item->state.tflag.s->hooks;
+ hooks = item->target.s->hooks;
}
if (self->entry == &cmd_show_hooks_entry) {