diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-06-04 23:34:33 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-06-04 23:34:33 +0000 |
commit | 689bd1eeb026568198e95ea3482afc2390fb11a3 (patch) | |
tree | 4faa4194c2689cbb75aadccb2022eb043c658f2d /usr.bin | |
parent | 5cf490878eb1443202f04b3b2ce5f4d71d3d587e (diff) |
Print a better message than '(null)' if no command is specified ("tmux \;").
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index ebceb5486d5..e652abd4afb 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.1 2009/06/01 22:58:49 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.2 2009/06/04 23:34:32 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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++) { |