Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2020-04-13 10:30:00 +01:00
74 changed files with 538 additions and 326 deletions

View File

@ -215,8 +215,10 @@ args_escape(const char *s)
char *escaped, *result;
int flags;
if (*s == '\0')
return (xstrdup(s));
if (*s == '\0') {
xasprintf(&result, "''");
return (result);
}
if (s[0] != ' ' &&
(strchr(quoted, s[0]) != NULL || s[0] == '~') &&
s[1] == '\0') {