summaryrefslogtreecommitdiff
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 07715d4..9fc215c 100644
--- a/lash.c
+++ b/lash.c
@@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
}
/* in shell, "\'" should yield \' */
- if (*src != quote)
+ if (*src != quote) {
*buf++ = '\\';
+ *buf++ = '\\';
+ }
} else if (*src == '*' || *src == '?' || *src == '[' ||
*src == ']') *buf++ = '\\';
*buf++ = *src;
diff --git a/sh.c b/sh.c
index 07715d4..9fc215c 100644
--- a/sh.c
+++ b/sh.c
@@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
}
/* in shell, "\'" should yield \' */
- if (*src != quote)
+ if (*src != quote) {
*buf++ = '\\';
+ *buf++ = '\\';
+ }
} else if (*src == '*' || *src == '?' || *src == '[' ||
*src == ']') *buf++ = '\\';
*buf++ = *src;
diff --git a/shell/lash.c b/shell/lash.c
index 07715d4..9fc215c 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
}
/* in shell, "\'" should yield \' */
- if (*src != quote)
+ if (*src != quote) {
*buf++ = '\\';
+ *buf++ = '\\';
+ }
} else if (*src == '*' || *src == '?' || *src == '[' ||
*src == ']') *buf++ = '\\';
*buf++ = *src;