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: Bernhard Voelker
Subject: Re: ls is broken, what's next cd?
Date: Mon, 5 Feb 2018 20:27:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/05/2018 07:45 PM, Kaz Kylheku (Coreutils) wrote:
> There is no need for this pointless garbage. Unix has gotten along
> without quoting the output of ls for 43 years now.

If you search the mailing list archive, then you'll see that
this has already been discussed (several times).

IMO the main reason that the current implementation is the right
direction is that file names became more and more "ugly" in the past
43 years.  Compare this quite easy cases:

  $ /bin/ls -N
  a b  c    d

  $ /bin/ls
  'a b'  'c '  ' d'

You see, you can still use
  alias ls='\ls -N'
to get the old, IMO broken output.

Programs which parse the output of "ls" are broken.

It is not about parsing, but rather about easier copy+paste in a terminal.
If the output is not a terminal, then ls(1) still falls back to the old
mode:

  $ /bin/ls | cat
  a b
  c
   d

Have a nice day,
Berny




reply via email to

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