summaryrefslogtreecommitdiffstats
path: root/cmd-kill-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-kill-window.c')
-rw-r--r--cmd-kill-window.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/cmd-kill-window.c b/cmd-kill-window.c
index aae1cc85..30f4c40e 100644
--- a/cmd-kill-window.c
+++ b/cmd-kill-window.c
@@ -28,22 +28,21 @@ int cmd_kill_window_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_kill_window_entry = {
"kill-window", "killw",
+ "t:", 0, 0,
CMD_TARGET_WINDOW_USAGE,
- 0, "",
- cmd_target_init,
- cmd_target_parse,
- cmd_kill_window_exec,
- cmd_target_free,
- cmd_target_print
+ 0,
+ NULL,
+ NULL,
+ cmd_kill_window_exec
};
int
cmd_kill_window_exec(struct cmd *self, struct cmd_ctx *ctx)
{
- struct cmd_target_data *data = self->data;
- struct winlink *wl;
+ struct args *args = self->args;
+ struct winlink *wl;
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL)
return (-1);
server_kill_window(wl->window);