aboutsummaryrefslogtreecommitdiff
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
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..73ed79f4 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, "%s", error);
+ } else
+ cmdq_error(cdata->item, "%s", error);
+ free(error);
}
}