summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 8d68a03e1..c22c536c0 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4082,7 +4082,11 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options,
quotearg_buffer (buf, len + 1, name, -1, options);
}
- if (qmark_funny_chars)
+ enum quoting_style qs = get_quoting_style (options);
+
+ if (qmark_funny_chars
+ && (qs == shell_quoting_style || qs == shell_always_quoting_style
+ || qs == literal_quoting_style))
{
if (MB_CUR_MAX > 1)
{