GNU bug report logs -
#24926
ls-quotes: ls output has been made ugly
Previous Next
Full log
View this message in rfc822 format
Eric Blake wrote:
> On 11/11/2016 03:25 PM, L. A. Walsh wrote:
>> Eric Blake wrote:
>>> If the idea is that the quoting is there to make copy-and-pasting into a
>>> shell command line easier, then there is nothing we can do that is less
>>> aggressive, since failing to quote spaces changes what the shell will
>>> do.
>> ----
>> I assume you are talking about "quoting-style=shell-always"
>> and not the conditional quoting you get for "quoting-style=shell"?
>
> quoting-style=shell-always uses quotes ALWAYS, even if the quotes are
> redundant. quoting-style=shell uses quotes ONLY if the shell could
> otherwise interpret it differently without the quotes.
---
I understand that. It sounded like you were talking
about changing the default output to use quotes, which would be
a disaster.
I know of multiple scripts that use
"\ls -1" to get a single column of filenames for input (assuming
it is known that there are no embedded newlines in your
filenames). For most people that is true. If you need more
quoting, then output strings with a \00 at the end. It's the
only guarantee of not being used in a filename.
This bug report was last modified 6 years and 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.