[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls output changes considered unacceptable

From: Eric Blake
Subject: Re: ls output changes considered unacceptable
Date: Wed, 17 Feb 2016 22:31:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/17/2016 06:46 PM, Michael Stone wrote:

> It's ugly and overly verbose. This one is completely subjective, but
> there seems to be some strong sentiment around it. As a practical
> matter, it doesn't matter much to me at all because I'm an
> old school unix guy and my filenames are lower case ascii with no
> spaces, except for the occasional Makefile or README. But I've seen what
> happens when you run ls with this quoting style on a bunch of filenames
> from a GUI system full of spaces and single quotes--the results are not
> pretty:
> 'I don'\''t think this is optimal.docx'  'My eye'\''s bleedin'\''.docx' 
> Simple.docx

I still think that if we went with:

"I don't think this is optimal.docx"  "My eye's bleedin'.docx"
Simple.docx  '"hi".docx'

that is, use "'" rather than ''\''' if there are no $, `, ", or \ in the
file name, then the worst of the complaints would disappear.  That is
still valid shell quoting, and by being smarter about when to use '' vs.
"", and catering to the fact that lone ' appear in more filenames than
other problematic characters inside "", it may reduce some of the
complaints, while still keeping shell quoting as the default.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]