summaryrefslogtreecommitdiffstats
path: root/arguments.c
diff options
context:
space:
mode:
authornicm <nicm>2019-06-20 07:10:56 +0000
committernicm <nicm>2019-06-20 07:10:56 +0000
commitcd1fc42df6d1bacac4f617e031c279ba31bc0632 (patch)
treeb1592d8eeb7746d6f9da263c258f5a7712a3361b /arguments.c
parentae541287d303fb253b3cd75341c318dcc6a8db4a (diff)
Add a -A flag to show-options to show parent options as well.
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 8e049aab..751d0607 100644
--- a/arguments.c
+++ b/arguments.c
@@ -213,7 +213,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);
}