summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-06-04 23:34:32 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-06-04 23:34:32 +0000
commit85e0d8a221314869458169955f218c9971f5bcb6 (patch)
tree19b213fe3d57c97ca475ddba7bc3a92c934c9417 /cmd.c
parent38b2c42f63eaa5fcd6f750aafc756b2a5e5b4395 (diff)
Print a better message than '(null)' if no command is specified ("tmux \;").
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c4
1 files changed, 3 insertions, 1 deletions
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++) {