Sujet : Re: Long filenames in DOS/Windows and Unix/Linux
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.unix.programmerDate : 04. Sep 2024, 00:15:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240903155649.659@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-09-03, Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
John Ames <commodorejohn@gmail.com> writes:
On Tue, 3 Sep 2024 20:11:28 -0000 (UTC)
Kaz Kylheku <643-408-1753@kylheku.com> wrote:
>
Because it is based on a strawman interpretation of the "no spaces"
rule. That strawman interpretation is that there are no other rules
used in combination with the "no spaces" rule, and thus that any
ridiculous name is fine, just as long as it doesn't contain spaces.
And so, look how unreadable is this 100 character name in CamelCase!
Q.E.D. no spaces is a bad recommendation!
>
Well, there were no other factors *presented* alongside the blanket
statement that spaces in filenames are unnecessary, so it would appear
on the face of it to be an accurate assessment of the claim being made,
which wasn't in a post of yours to begin with.
>
And I'd still like to know who died and made whom king where filenames
and spaces therein are concrned.
>
There is no official "rule" about spaces in filenames, though I can
imagine easily imagine that some organizations and projects have
rules forbidding them. A couple of data points: The gcc git repo
contains 137394 files and none of them have spaces in their names.
The GCC project is Makefile-based.
The make utility has no support for paths with spaces.
Use of make is a great repellant against spaces in names.
If a make variable contains spaces, there is no way to quote it within
make. There is no way to express a prerequisite or target name with
spaces. GNU Make text processing constructs like $(foreach ...)
don't deal with spaces; there is no way for them to identify items
that contain spaces.
The Linux kernel git repo contains 85803 files, and exactly one has
spaces in its name.
You can bet it's one that's not referenced in any Makefile.
Spaces in file names are likely not to be an issue if you interact
with the filesystem via a GUI like Windows Explorer *or* if you use
a scripting language like Perl or Python that requires strings used
as filenames to be enclosed in quotation marks. In those contexts,
space is just another character.
The buffoons that use spaces in document names in GUIs will find some
way to confuse themselves, like typing two spaces instead of one, or
quoting names to each other in e-mails without enough delimitation or
use of typeface to know which words are part of the name and which are
surrounding text.
E.g.
A: "Can you send the file analysis and report to me?"
B: "I will report to you, but I can't find the file analysis."
A: "No, the file is called analysis and report. :) Send that to me."
If you follow the convention that name of a file is one word that
contains no leading or trailing punctuation, then you can use it in
written sentences without ambiguity or quotes around it.
You can put a period or comma after it, and know that it can't
be part of the name since it would constitute trailing punctuation.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca