summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index 08242920..9791bee7 100644
--- a/cmd.c
+++ b/cmd.c
@@ -692,7 +692,7 @@ cmd_template_replace(const char *template, const char *s, int idx)
buf = xrealloc(buf, len + (strlen(s) * 2) + 1);
for (cp = s; *cp != '\0'; cp++) {
- if (quoted && *cp == '"')
+ if (quoted && (*cp == '"' || *cp == '$'))
buf[len++] = '\\';
buf[len++] = *cp;
}