GNU bug report logs -
#41075
Changes to 'ls' output
Previous Next
Reported by: Chris Elvidge <celvidge001 <at> gmail.com>
Date: Mon, 4 May 2020 12:34:01 UTC
Severity: normal
Tags: notabug
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #12 received at control <at> debbugs.gnu.org (full text, mbox):
tag 41075 notabug
close 41075
stop
On 04/05/2020 10:43, Chris Elvidge wrote:
> I have noticed that the output of ls seems to have changed from v8.25 to
> v8.32 where there is an apostrophe in the filename (sometimes); change
> from " surrounding to ' surrounding and '\'' replacing '. When output is
> piped through xxd, it is the same in both versions. I have 8.32
> installed in ~/bin/. Any ideas?
This is due to new quoting functionality which is discussed at:
https://www.gnu.org/software/coreutils/quotes.html
As to your particular observation,
when there are only single quotes, then we'll change
to using double quotes to simplify the quoting.
Once there are other problematic characters,
we switch to quoting with single quotes,
as shown in these examples:
$ ls -1
"just'single"
'single'\''and(brackets)'
Note quoting is disabled when output is not to a terminal.
$ ls -1 | cat
just'single
single'and(brackets)
You can disable this quoting behavior if you prefer, by adding '-N' to your ls alias.
thanks,
Pádraig
This bug report was last modified 5 years and 74 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.