summaryrefslogtreecommitdiffstats
path: root/cmd-string.c
authornicm <nicm>2008-12-08 16:19:51 (GMT)
committer nicm <nicm>2008-12-08 16:19:51 (GMT)
commit8256adb023f35b3474ddac0c447c27df20995a23 (patch) (side-by-side diff)
treec63a0e9b6996fef3b71a4332334478c541d7b99f /cmd-string.c
parentff0412de8c8aa2233ff87c6b8e1e4bc61dbbfe11 (diff)
downloadtmux-old-8256adb023f35b3474ddac0c447c27df20995a23.zip
tmux-old-8256adb023f35b3474ddac0c447c27df20995a23.tar.gz
tmux-old-8256adb023f35b3474ddac0c447c27df20995a23.tar.bz2
Make window options work the same was as session options, add mode-fg/mode-bg options, force -g for global on set/show/setw/showw/
Diffstat (limited to 'cmd-string.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cmd-string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-string.c b/cmd-string.c
index e1e7e81..111c599 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -131,7 +131,8 @@ cmd_string_parse(const char *s, struct cmd **cmd, char **cause)
if (argc == 0)
goto out;
- *cmd = cmd_parse(argc, argv, cause);
+ if ((*cmd = cmd_parse(argc, argv, cause)) == NULL)
+ goto error;
rval = 0;
goto out;
default:
@@ -145,7 +146,7 @@ cmd_string_parse(const char *s, struct cmd **cmd, char **cause)
}
error:
- xasprintf(cause, "bad command: %s", s);
+ xasprintf(cause, "invalid or unknown command: %s", s);
out:
if (buf != NULL)