diff options
author | Jim Meyering <jim@meyering.net> | 1998-08-15 16:43:13 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-08-15 16:43:13 +0000 |
commit | 79d411ceba0e71d6c049f5fe44142247b752adee (patch) | |
tree | a3d399295e024a3234cd402a440bb1f869dd5628 /src/ls.c | |
parent | 52070d3e4a02c2a4388ea6dac1c2511d89507936 (diff) | |
download | coreutils-79d411ceba0e71d6c049f5fe44142247b752adee.tar.xz |
(qmark_funny_chars): Add comment from Paul eggert.
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -449,8 +449,15 @@ struct ignore_pattern static struct ignore_pattern *ignore_patterns; -/* Nonzero means output nongraphic chars in file names as `?'. -q */ - +/* Nonzero means output nongraphic chars in file names as `?'. + (-q, --hide-control-chars) + qmark_funny_chars and the quoting style (-Q, --quoting-style=WORD) are + independent. The algorithm is: first, obey the quoting style to get a + string representing the file name; then, if qmark_funny_chars is set, + replace all nonprintable chars in that string with `?'. It's necessary + to replace nonprintable chars even in quoted strings, because we don't + want to mess up the terminal if control chars get sent to it, and some + quoting methods pass through control chars as-is. */ static int qmark_funny_chars; /* Quoting options for file and dir name output. */ @@ -820,6 +827,7 @@ decode_switches (int argc, char **argv) if (isatty (1)) { format = many_per_line; + /* See description of qmark_funny_chars, above. */ qmark_funny_chars = 1; } else |