summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c
index e08dc58..6dfe56f 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1758,7 +1758,7 @@ read_shellcmd (struct argspec *spec, struct sbuf *s, struct cmdarg **arg, const
cmdret *ret;
ret = read_string (spec, s, hist_SHELLCMD, exec_completions, arg);
- if (command_name && !s && !ret) {
+ if (command_name && !s && !ret && (*arg)->string) {
/* store for command history */
struct sbuf *buf;