aboutsummaryrefslogtreecommitdiff
path: root/sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'sh.c')
-rw-r--r--sh.c4
1 files changed, 3 insertions, 1 deletions
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;