aboutsummaryrefslogtreecommitdiff
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2021-04-13 06:25:59 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2021-04-13 06:25:59 +0100
commitc2048c5c65aea99f2b79290b87635cb1d90863a6 (patch)
tree8aafdf588893ccdd65c8db53f5188f83f020675b /cmd-run-shell.c
parent46cbbe3d4566885b8ad4235598389936f63c2c01 (diff)
parentbedf2bd4372c60a525c22e6309f329cfd0bd07bc (diff)
downloadrtmux-c2048c5c65aea99f2b79290b87635cb1d90863a6.tar.gz
rtmux-c2048c5c65aea99f2b79290b87635cb1d90863a6.tar.bz2
rtmux-c2048c5c65aea99f2b79290b87635cb1d90863a6.zip
Merge branch 'master' into 3.2-rc
Diffstat (limited to 'cmd-run-shell.c')
-rw-r--r--cmd-run-shell.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 4f30d05d..56d5f723 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <sys/wait.h>
+#include <ctype.h>
#include <stdlib.h>
#include <string.h>
@@ -190,8 +191,12 @@ cmd_run_shell_timer(__unused int fd, __unused short events, void* arg)
&error);
}
if (status == CMD_PARSE_ERROR) {
- cmdq_error(cdata->item, "%s", error);
- free(error);
+ if (cdata->item == NULL) {
+ *error = toupper((u_char)*error);
+ status_message_set(c, -1, 1, 0, "%s", error);
+ } else
+ cmdq_error(cdata->item, "%s", error);
+ free(error);
}
}