[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls is broken, what's next cd?
From: |
Harald Dunkel |
Subject: |
Re: ls is broken, what's next cd? |
Date: |
Wed, 7 Feb 2018 10:12:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/05/18 20:27, Bernhard Voelker wrote:
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.
Or you could keep ls' default behavior everybody (except for
a few) was happy with.
Seriously, the output of ls was never meant to be read by
anything but a human. Some of us are used to the traditional
output of ls for more than 30 years. No wonder that there is
resistance against changing the default behavior: It is just
distracting.
You have to admit that this is just weird (don't blame me,
I didn't start using weird file names in this thread):
% touch /tmp/\'abc\ def\'
% touch /tmp/abc\ def
% touch /tmp/\'abc\ def\"
% touch /tmp/\"abc\ def\'
% src/ls -l /tmp/*abc*
-rw-r--r-- 1 hdunkel users 0 Feb 7 10:00 '/tmp/"abc def'\'''
-rw-r--r-- 1 hdunkel users 0 Feb 7 09:59 '/tmp/'\''abc def"'
-rw-r--r-- 1 hdunkel users 0 Feb 7 09:59 "/tmp/'abc def'"
-rw-r--r-- 1 hdunkel users 0 Feb 7 09:59 '/tmp/abc def'
I wonder who is supposed to benefit from this change? For a
human eye these constructs are simply unrecognizable, unless
you look *very* closely.
For pipe processing you should consider "find -print0" and
"xargs -0".
Just my $0.02. Regards
Harri
- Re: ls is broken, what's next cd?, (continued)
- Re: ls is broken, what's next cd?, Kaz Kylheku (Coreutils), 2018/02/06
- Re: ls is broken, what's next cd?, Michael, 2018/02/07
- Re: ls is broken, what's next cd?, Jeffrey Walton, 2018/02/07
- Re: ls is broken, what's next cd?, Michael, 2018/02/07
- Re: ls is broken, what's next cd?, Eric Blake, 2018/02/08
- Re: ls is broken, what's next cd?, Bernhard Voelker, 2018/02/07
- Re: ls is broken, what's next cd?, Kamil Dudka, 2018/02/06
- Re: ls is broken, what's next cd?, Eric Blake, 2018/02/06
- Re: ls is broken, what's next cd?, Kamil Dudka, 2018/02/06
- Re: ls is broken, what's next cd?, Bernhard Voelker, 2018/02/06
- Re: ls is broken, what's next cd?,
Harald Dunkel <=
- Re: ls is broken, what's next cd?, Bernhard Voelker, 2018/02/07
- Re: ls is broken, what's next cd?, Harald Dunkel, 2018/02/13
- Re: ls is broken, what's next cd?, Bernhard Voelker, 2018/02/15
- Re: ls is broken, what's next cd?, Harald Dunkel, 2018/02/16
- Re: ls is broken, what's next cd?, Pádraig Brady, 2018/02/17