Hey.

I've also just stumbled over this... while the idea is nice in
principle, I think it's quite dangerous as well... even if behaviour is
preserved when output goes to a terminal.

a) The quotation alone doesn't necessarily help with copy&paste,
depending on where you paste.

b) When the pasted content is actually further to be processed by e.g.
old scripts (which expect perhaps one *unquoted* name per line) things
will fail.

c) We now have what you see is NOT what you get [when stdout is not a
terminal]
People do use ls in all it's variations in countless of scripts, and
they build up their scripts by first trying it out on the terminal to
see what they get is what they want to have in the script.
But now, what they get is different in both.
And the change isn't necessarily one that get's noticed, but it still
may lead to all kinds of garbage, wrong files being deleted and so on.

Consider a user writes a script that shall deleted all files from
2012... a stupid solution may be something like:
rm -f "$( ls -1l | grep <some pattern that matches the date column> | sed "some 
pattern that removes everything up the filename" | xargs )"
On the terminal this may give proper:
rm -f 'file with spaces mythesis.pdf'
in the script this would give
rm -f file with spaces mythesis.pdf

Well I'm not claiming that the above way is a proper way to delete
files from 2012 ;-) ... but people often do such things...


Long story short... this shouldn't be default but a opt-in.

And if it really stays default, which seems just like tickling the
dragon, it needs a NEWS.Debian entry.


Cheers,
Chris.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to