summaryrefslogtreecommitdiffstats
path: root/cmd-has-session.c
diff options
context:
space:
mode:
authornicm <nicm>2008-06-05 21:24:59 +0000
committernicm <nicm>2008-06-05 21:24:59 +0000
commit0684cda274f56065d58bc672b7aca08a6931c642 (patch)
treec2c4e58b122b6685d0363daacc3802ae484006eb /cmd-has-session.c
parent8ec72d5b7f72d1559d31388c92ed624420527ebb (diff)
downloadtmux-old-0684cda274f56065d58bc672b7aca08a6931c642.tar.gz
tmux-old-0684cda274f56065d58bc672b7aca08a6931c642.tar.bz2
tmux-old-0684cda274f56065d58bc672b7aca08a6931c642.zip
Big reorganisation of command-line syntax.
Diffstat (limited to 'cmd-has-session.c')
-rw-r--r--cmd-has-session.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/cmd-has-session.c b/cmd-has-session.c
index b53825f6..3727d786 100644
--- a/cmd-has-session.c
+++ b/cmd-has-session.c
@@ -28,23 +28,24 @@ void cmd_has_session_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_has_session_entry = {
"has-session", "has",
- CMD_SESSIONONLY_USAGE,
+ CMD_TARGET_SESSION_USAGE,
0,
- cmd_sessiononly_parse,
+ cmd_target_init,
+ cmd_target_parse,
cmd_has_session_exec,
- cmd_sessiononly_send,
- cmd_sessiononly_recv,
- cmd_sessiononly_free,
- NULL,
- cmd_sessiononly_print
+ cmd_target_send,
+ cmd_target_recv,
+ cmd_target_free,
+ cmd_target_print
};
void
cmd_has_session_exec(struct cmd *self, struct cmd_ctx *ctx)
{
- struct session *s;
+ struct cmd_target_data *data = self->data;
+ struct session *s;
- if ((s = cmd_sessiononly_get(self, ctx)) == NULL)
+ if ((s = cmd_find_session(ctx, data->target)) == NULL)
return;
if (ctx->cmdclient != NULL)