mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00:00
Print a better message than '(null)' if no command is specified ("tmux \;").
This commit is contained in:
parent
f90450f854
commit
b9155e835a
6
cmd.c
6
cmd.c
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd.c,v 1.95 2009-05-16 11:48:47 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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user