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 0f093a6..bb129ae 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1705,7 +1705,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 && !ret) {
+ if (command_name && !s && !ret) {
/* store for command history */
char *s = xmalloc (strlen(command_name) + strlen((*arg)->string) + 2);
sprintf (s, "%s %s", command_name, (*arg)->string);