From ff21dbd58b8ca24ec47df0816b2245499a4a49b4 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 16 Jun 2008 22:03:27 +0000 Subject: Explanation of -t. --- cmd.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'cmd.c') diff --git a/cmd.c b/cmd.c index b801f85b..2e83e30e 100644 --- a/cmd.c +++ b/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 @@ -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); } -- cgit