diff options
Diffstat (limited to 'usr.bin/tmux/cmd-kill-session.c')
-rw-r--r-- | usr.bin/tmux/cmd-kill-session.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/usr.bin/tmux/cmd-kill-session.c b/usr.bin/tmux/cmd-kill-session.c index 6b778ce2f5f..4faad9f4630 100644 --- a/usr.bin/tmux/cmd-kill-session.c +++ b/usr.bin/tmux/cmd-kill-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-session.c,v 1.7 2010/06/26 23:55:50 nicm Exp $ */ +/* $OpenBSD: cmd-kill-session.c,v 1.8 2011/01/04 00:42:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -31,22 +31,21 @@ int cmd_kill_session_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_kill_session_entry = { "kill-session", NULL, + "t:", 0, 0, CMD_TARGET_SESSION_USAGE, - 0, "", - cmd_target_init, - cmd_target_parse, - cmd_kill_session_exec, - cmd_target_free, - cmd_target_print + 0, + NULL, + NULL, + cmd_kill_session_exec }; int cmd_kill_session_exec(struct cmd *self, struct cmd_ctx *ctx) { - struct cmd_target_data *data = self->data; - struct session *s; + struct args *args = self->args; + struct session *s; - if ((s = cmd_find_session(ctx, data->target)) == NULL) + if ((s = cmd_find_session(ctx, args_get(args, 't'))) == NULL) return (-1); server_destroy_session(s); |