GNU bug report logs -
#25388
ls-quotes: kills existing scripts reading "ls" -1 as input
Previous Next
Reported by: L A Walsh <coreutils <at> tlinx.org>
Date: Sun, 8 Jan 2017 03:53:01 UTC
Severity: normal
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 01/09/2017 01:38 PM, L A Walsh wrote:
>
>
> Paul Eggert wrote:
>> On 01/09/2017 10:48 AM, L A Walsh wrote:
>>> That's not what I'm used to:
>>
>> I couldn't parse your email.
> ---
> 1) I ran the ls command on a directory, shows 4 columns (that were in
> color).
That right there is a clue that your 'ls' is a non-standard alias that
is adding additional command lines. 'ls' by default does not output in
color.
> 2) Next I ran the same ls command through more (really 'less' -- something
> set @ distro level, but found convenient, so kept it). Output is
> identical.
Again, output is identical BECAUSE of your alias. But if you run:
\ls | more
you will get DIFFERENT output.
> It's not good practice, IMO, to be altering output based on
> what (or who) is reading it (at least not by default).
Good or not, it IS what happens, and we can't change it due to years of
usage.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
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.