summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-08-29 18:02:29 +0100
committerThomas Adam <thomas@xteddy.org>2019-08-29 18:02:29 +0100
commit648471eceeea1e93d085a250cb8804e71af567b0 (patch)
tree34446cc187d065c4b92d3955eec568f82feffa2d /cmd.c
parent4fa1f961f37a4dbd530141fb6fdcfb801b1cb07b (diff)
parent7ce813513818e58d3d35116c868bd6c8d866c997 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd.c b/cmd.c
index 7c9d89c8..96cedc97 100644
--- a/cmd.c
+++ b/cmd.c
@@ -660,7 +660,7 @@ char *
cmd_template_replace(const char *template, const char *s, int idx)
{
char ch, *buf;
- const char *ptr, *cp, quote[] = "\"\\$";
+ const char *ptr, *cp, quote[] = "\"\\$;";
int replaced, quoted;
size_t len;
@@ -691,10 +691,6 @@ cmd_template_replace(const char *template, const char *s, int idx)
for (cp = s; *cp != '\0'; cp++) {
if (quoted && strchr(quote, *cp) != NULL)
buf[len++] = '\\';
- if (quoted && *cp == ';') {
- buf[len++] = '\\';
- buf[len++] = '\\';
- }
buf[len++] = *cp;
}
buf[len] = '\0';