mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-16 00:28:10 +02:00
Explanation of -t.
This commit is contained in:
18
cmd.c
18
cmd.c
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd.c,v 1.47 2008-06-16 07:01:41 nicm Exp $ */
|
||||
/* $Id: cmd.c,v 1.48 2008-06-16 22:03:27 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -281,8 +281,12 @@ cmd_find_client(struct cmd_ctx *ctx, const char *arg)
|
||||
|
||||
if ((c = arg_parse_client(arg)) == NULL)
|
||||
c = ctx->curclient;
|
||||
if (c == NULL)
|
||||
ctx->error(ctx, "client not found: %s", arg);
|
||||
if (c == NULL) {
|
||||
if (arg != NULL)
|
||||
ctx->error(ctx, "client not found: %s", arg);
|
||||
else
|
||||
ctx->error(ctx, "no client found");
|
||||
}
|
||||
return (c);
|
||||
}
|
||||
|
||||
@ -295,8 +299,12 @@ cmd_find_session(struct cmd_ctx *ctx, const char *arg)
|
||||
s = ctx->cursession;
|
||||
if (s == NULL)
|
||||
s = cmd_current_session(ctx);
|
||||
if (s == NULL)
|
||||
ctx->error(ctx, "session not found: %s", arg);
|
||||
if (s == NULL) {
|
||||
if (arg != NULL)
|
||||
ctx->error(ctx, "session not found: %s", arg);
|
||||
else
|
||||
ctx->error(ctx, "no session found");
|
||||
}
|
||||
return (s);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user