aboutsummaryrefslogtreecommitdiff
path: root/cmd-string.c
diff options
context:
space:
mode:
authornicm <nicm>2019-04-26 11:38:51 +0000
committernicm <nicm>2019-04-26 11:38:51 +0000
commitdfb7bb683057d08303955c49073f4b475bd0e2d6 (patch)
tree3adae7924f831bce4f28ec5aef5528793319ada4 /cmd-string.c
parentf1e14f86c4d2467571e20a3dca4a96a3cc357897 (diff)
downloadrtmux-dfb7bb683057d08303955c49073f4b475bd0e2d6.tar.gz
rtmux-dfb7bb683057d08303955c49073f4b475bd0e2d6.tar.bz2
rtmux-dfb7bb683057d08303955c49073f4b475bd0e2d6.zip
Merge hooks into options and make each one an array option. This allows
multiple commands to be easily bound to one hook. set-hook and show-hooks remain but they are now variants of set-option and show-options. show-options now has a -H flag to show hooks (by default they are not shown).
Diffstat (limited to 'cmd-string.c')
-rw-r--r--cmd-string.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-string.c b/cmd-string.c
index 440a0231..058f997c 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -174,7 +174,10 @@ cmd_string_parse(const char *s, const char *file, u_int line, char **cause)
int argc;
char **argv;
- *cause = NULL;
+ if (cause != NULL)
+ *cause = NULL;
+ log_debug ("%s: %s", __func__, s);
+
if (cmd_string_split(s, &argc, &argv) != 0) {
xasprintf(cause, "invalid or unknown command: %s", s);
return (NULL);