On 21/01/16 19:25, Mike Frysinger wrote: > in cases where the filename has a single quote in it, and no other > expandable chars (like $ or `), would it be better to use double > quotes to quote the output ? > > for example, i have a file like: > My Sister's stuff.xls > > the new ls quote behavior shows it like: > 'My Sister'\''s stuff.xls' > > double quotes would be nicer: > "My Sister's stuff.xls"
Yes that would be a bit better, though then you have to worry about what's special within double quotes and that varies between shells. Also one has the option to use the preferred char for an apostrophe ’ (AltGr+0 on my keyboard), avoiding shell meta chars in file names. I.E.: 'My Sister’s stuff.xls' > on a related note, how do you turn this off ? the `ls --help` only > shows ways to turn it on, and i don't see options from a quick scan > of the ls.c code. export QUOTING_STYLE=literal or ls -N cheers, Pádraig.
