aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lash.c4
-rw-r--r--sh.c4
-rw-r--r--shell/lash.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/lash.c b/lash.c
index 07715d4e3..9fc215c98 100644
--- a/lash.c
+++ b/lash.c
@@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
933 } 933 }
934 934
935 /* in shell, "\'" should yield \' */ 935 /* in shell, "\'" should yield \' */
936 if (*src != quote) 936 if (*src != quote) {
937 *buf++ = '\\'; 937 *buf++ = '\\';
938 *buf++ = '\\';
939 }
938 } else if (*src == '*' || *src == '?' || *src == '[' || 940 } else if (*src == '*' || *src == '?' || *src == '[' ||
939 *src == ']') *buf++ = '\\'; 941 *src == ']') *buf++ = '\\';
940 *buf++ = *src; 942 *buf++ = *src;
diff --git a/sh.c b/sh.c
index 07715d4e3..9fc215c98 100644
--- a/sh.c
+++ b/sh.c
@@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
933 } 933 }
934 934
935 /* in shell, "\'" should yield \' */ 935 /* in shell, "\'" should yield \' */
936 if (*src != quote) 936 if (*src != quote) {
937 *buf++ = '\\'; 937 *buf++ = '\\';
938 *buf++ = '\\';
939 }
938 } else if (*src == '*' || *src == '?' || *src == '[' || 940 } else if (*src == '*' || *src == '?' || *src == '[' ||
939 *src == ']') *buf++ = '\\'; 941 *src == ']') *buf++ = '\\';
940 *buf++ = *src; 942 *buf++ = *src;
diff --git a/shell/lash.c b/shell/lash.c
index 07715d4e3..9fc215c98 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
933 } 933 }
934 934
935 /* in shell, "\'" should yield \' */ 935 /* in shell, "\'" should yield \' */
936 if (*src != quote) 936 if (*src != quote) {
937 *buf++ = '\\'; 937 *buf++ = '\\';
938 *buf++ = '\\';
939 }
938 } else if (*src == '*' || *src == '?' || *src == '[' || 940 } else if (*src == '*' || *src == '?' || *src == '[' ||
939 *src == ']') *buf++ = '\\'; 941 *src == ']') *buf++ = '\\';
940 *buf++ = *src; 942 *buf++ = *src;