Hi,
I would like to document, in quotearg.h, the possible purposes of the
'quotearg' module.
Clearly, not all *_quoting_style styles fulfil all the possible purposes.
But once we have a list of possible purposes, we can make up the matrix
which style fulfils which purposes.
The purposes I can think of are the following:
* Avoid ambiguous diagnostics. For instance, if 'E.T.' is the name of
a network interface:
program: cannot connect to E.T.
is ambiguous, whereas
program: cannot connect to 'E.T.'
is less ambiguous.
* Avoid emitting escape sequences that, by virtue of being ANSI
escape sequences <https://en.wikipedia.org/wiki/ANSI_escape_code>,
may cause trouble in the terminal, including (but not limited to)
- displaying fake results,
- crashing the terminal.
For instance, create a file like this:
$ touch `printf 'fooinv\x1b[3Dbar'`
Then some diagnostics might make the user think that they are about
'foobar'.
* Avoid printing characters that are "unprintable" in the terminal's
encoding. If that encoding is not UTF-8, they would typically leave
no traces on screen, thus end up presenting misleading results.
Other purposes that I missed?
Bruno