From 85e0d8a221314869458169955f218c9971f5bcb6 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 4 Jun 2009 23:34:32 +0000 Subject: [PATCH] Print a better message than '(null)' if no command is specified ("tmux \;"). --- cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index fc87558d..68dd06a3 100644 --- a/cmd.c +++ b/cmd.c @@ -108,8 +108,10 @@ cmd_parse(int argc, char **argv, char **cause) int opt; *cause = NULL; - if (argc == 0) + if (argc == 0) { + xasprintf(cause, "no command"); return (NULL); + } entry = NULL; for (entryp = cmd_table; *entryp != NULL; entryp++) {