:: Re: [DNG] Coreutils 8.25 ls output
Página Principal
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
Para: dng
Assunto: Re: [DNG] Coreutils 8.25 ls output
On Tue, 16 Feb 2016 16:07:35 +0200
Aldemir Akpinar <aldemir.akpinar@???> wrote:

> There's a recent discussion on the coreutils mailing list, where some
> people complained about the default ls output with latest release. On
> coreutils 8.25 ls will wrap filenames with quotes if it includes
> whitespace.
>
> And when people protest, the answers are usual arguments; it just
> happens on the console output, or just add -N to your aliases etc.
> etc.
>
> Here's a discussion with the response from the maintainer as well:
>
> http://unix.stackexchange.com/questions/258679/why-is-ls-suddenly-surrounding-items-with-spaces-in-single-quotes
>
> When this version hits the distributions, it will break many scripts.
> So why change the default behaviour?
> --
> aldemir


My response is unresponsive to your question, aldemir, but this is
something I've given lots of thought to in the past. I quote from the
referenced web page:

=================================================

I just noticed that on one of my machines (running Debian Sid)
whenever I type ls any file name
with spaces has single quotes surrounding it.
^^^^^^^^^^^

=================================================

Here at Troubleshooters.Com we have a policy that only the following
characters can appear in a filename:

[a-z,A-Z,0-9,\.\_\-]

You've all heard me criticize programmers who make it easier on
themselves by making it harder on the user. But there are limits to
that philosophy, and given that there's so much filename parsing
throughout all of POSIX, and so much separating commands into
executable names and arguments, I believe filenames should have been
restricted for the good of everybody.

PDP11/RT-11 and CPM didn't allow spaces in filenames, and they worked
just fine.

Think about where most of your space-laden filenames come from: They're
emailed to you by no-tech, no-discipline Windows-weenies. Well, unless
FreeDesktop has recently made space-laden config files, but I don't
think even FreeDesktop is *that* ignorant.

Of course, none of this responds to the fact that space-laden filenames
*do* exist, so script writers have had to work around that, and some of
those workarounds might bust.

SteveT

Steve Litt
February 2016 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key