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 http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to