coreutils
[Top][All Lists]
Advanced

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

Re: ls is broken, what's next cd?


From: Eric Blake
Subject: Re: ls is broken, what's next cd?
Date: Tue, 6 Feb 2018 08:22:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 02/06/2018 03:30 AM, Michael wrote:
On 06/02/2018 08:13, Bernhard Voelker wrote:
On 02/06/2018 12:41 AM, Michael Felt wrote:
imho, the main problem is you change the default behavior, and 43 years
of programs are broken.

no, as explained it does not affect programs and scripts, because this
only changes the output to the terminal.

Yes, I thought about that too. So, maybe I would have liked the choice to be able to have them quoted IF and/or WHEN I needed to cut/paste names. But now I must either not install coreutils (as I have that option) or always remember to add three characters (' -N') everytime I want normal ls output.

Not true. Create a shell function or alias that turns 'ls' into 'ls -N' when invoked interactively; or even a shell script wrapper early on your $PATH that checks whether it is invoked with a tty as stdout. Then when you use 'ls' interactively, you get the behavior YOU like; while scripts still get the behavior they are used to.

The default has to be sane for the widest set of use cases (which is why we changed it to quote by default for names that are otherwise ambiguous or dangerous to a terminal), but no one says you have to use the default without customization.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]