[Top][All Lists]

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

Re: broken ls in coreutils 8.25

From: Eric Blake
Subject: Re: broken ls in coreutils 8.25
Date: Tue, 2 Feb 2016 06:30:03 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/01/2016 11:17 PM, Harald Dunkel wrote:
> Hi Pádraig,
> On 02/01/16 17:07, Pádraig Brady wrote:
>> On 31/01/16 06:48, Harald Dunkel wrote:
>> The reasons we changed the default was:
>> - It only happens when outputting to terminals
> This means if you use "ls -1 | somescript" the script will
> not see the quoting style. Don't you think that this is
> inconsistent, not to mention that a script would benefit
> much more from this quoting style than a human?

No. ls _already_ behaves differently when not outputting to a terminal
(that is, 'ls | somescript' and 'ls -1 | somescript' behave the same,
because a non-terminal implies -1).

>> - It disambiguates the output for users
> This means that the user has to count '\' and "'" in the output
> of ls to get the "real" filename.

Yeah, but which are you more likely to do, retype the "real" filename
manually (and insert your own shell quoting as appropriate), or
copy-and-paste the existing output with a mouse click or two?

>> - Output can be pasted back in the shell for further processing
> This means that it useful only on a graphic terminal, for people
> using a mouse, but it affects all users using "ls"

These days, how many users are NOT using a graphical terminal?  Again,
it only affects output to a terminal, and it is very easy to adjust your
login setups to change the defaults to something you like, so that
_your_ terminal behaves the way you want.

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]