summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-11-03 16:32:08 +0000
committerPádraig Brady <P@draigBrady.com>2015-11-04 23:30:15 +0000
commit109b9220cead6e979d22d16327c4d9f8350431cc (patch)
tree048d336b23d02068fe926224da83c06415b0a3fd /src
parent5ef08864113505c6392158c9fac9a6cb1b3ac0e6 (diff)
downloadcoreutils-109b9220cead6e979d22d16327c4d9f8350431cc.tar.xz
ls: default to --quoting=shell-escape for output to terminal
* src/ls.c (decode_switches): Set "shell-escape" if isatty(). * doc/coreutils.texi (ls invocation): Update the defaults description. * NEWS: Mention the change in behavior. It should not have backwards compat issues, but mentioning here just in case.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ls.c b/src/ls.c
index c22c536c0..2ae548d99 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1581,6 +1581,7 @@ decode_switches (int argc, char **argv)
if (isatty (STDOUT_FILENO))
{
format = many_per_line;
+ set_quoting_style (NULL, shell_escape_quoting_style);
/* See description of qmark_funny_chars, above. */
qmark_funny_chars = true;
}