summaryrefslogtreecommitdiffstats
path: root/arguments.c
diff options
context:
space:
mode:
Diffstat (limited to 'arguments.c')
-rw-r--r--arguments.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arguments.c b/arguments.c
index c8a6ab45..f7b6cbe1 100644
--- a/arguments.c
+++ b/arguments.c
@@ -212,7 +212,9 @@ args_escape(const char *s)
if (*s == '\0')
return (xstrdup(s));
- if ((strchr(quoted, s[0]) != NULL || s[0] == '~') && s[1] == '\0') {
+ if (s[0] != ' ' &&
+ (strchr(quoted, s[0]) != NULL || s[0] == '~') &&
+ s[1] == '\0') {
xasprintf(&escaped, "\\%c", s[0]);
return (escaped);
}