mirror of
https://github.com/tmate-io/tmate.git
synced 2026-07-25 20:04:02 +00:00
Print a better message than '(null)' if no command is specified ("tmux \;").
This commit is contained in:
parent
f90450f854
commit
b9155e835a
1 changed files with 4 additions and 2 deletions
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…
Add table
Add a link
Reference in a new issue