Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2020-06-04 10:01:20 +01:00
4 changed files with 109 additions and 179 deletions

View File

@ -226,6 +226,11 @@ args_escape(const char *s)
return (escaped);
}
if (strchr(s, ' ') != NULL && strchr(s, '\'') == NULL) {
xasprintf(&escaped, "'%s'", s);
return (escaped);
}
flags = VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL;
if (s[strcspn(s, quoted)] != '\0')
flags |= VIS_DQ;