diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-11-04 01:14:33 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-11-04 23:30:15 +0000 |
commit | c3763e5219979a714d380304b4847c9b1671241a (patch) | |
tree | c03037a34bc7d825889134b3ad53cededd1bab16 /src/paste.c | |
parent | 109b9220cead6e979d22d16327c4d9f8350431cc (diff) | |
download | coreutils-c3763e5219979a714d380304b4847c9b1671241a.tar.xz |
paste: avoid confusing backslash quoting in diagnostic
* src/paste.c (main): Setting the quoting style to "escape"
went against the intent of the comment about presenting
doubled backslashes to the user. Instead use "c-maybe"
which is the only mode which avoids doubled backslashes,
and provides protection against arbitrary control characters.
* tests/misc/paste.pl: Adjust accordingly.
Diffstat (limited to 'src/paste.c')
-rw-r--r-- | src/paste.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/paste.c b/src/paste.c index 5781ccd3e..761ae8d94 100644 --- a/src/paste.c +++ b/src/paste.c @@ -500,9 +500,9 @@ main (int argc, char **argv) if (collapse_escapes (delim_arg)) { - /* Don't use the default quoting style, because that would double the + /* Don't use the quote() quoting style, because that would double the number of displayed backslashes, making the diagnostic look bogus. */ - set_quoting_style (NULL, escape_quoting_style); + set_quoting_style (NULL, c_maybe_quoting_style); error (EXIT_FAILURE, 0, _("delimiter list ends with an unescaped backslash: %s"), quotearg_colon (delim_arg)); |