summaryrefslogtreecommitdiffstats
path: root/cmd-string.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-12-08 16:19:51 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-12-08 16:19:51 +0000
commit7a82e86827e3d863a6dc4f1d50985f287d1ff86b (patch)
tree34bcc703d5d79065c5ef364be2a6ebfbc13cf6d0 /cmd-string.c
parentf008d303e75c185eebcbb493b4e6d49bb400f694 (diff)
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')
-rw-r--r--cmd-string.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-string.c b/cmd-string.c
index b896701e..45677310 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-string.c,v 1.7 2008-09-26 06:45:26 nicm Exp $ */
+/* $Id: cmd-string.c,v 1.8 2008-12-08 16:19:51 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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)