Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by enriquto on Monday November 18, 2019 @04:00PM
(#21568095)
I agree, and the solution to this problem is to forbid filenames with spaces. The convenience of make and similar tools is much more important than spaces in filenames. File names with spaces should not be allowed in modern filesystems. When the user types a filename with spaces, the GUI should encode the space as a non-breaking space character, that does not cause havoc in scripts.
[ Parent
| on HN ]
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by jobigoud on Monday November 18, 2019 @07:09PM
(#21569511)
> the GUI should encode the space as a non-breaking space character
At this rate, why can't the tool itself escape the spaces from the filenames into non-breaking-spaces before processing?
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by emiliobumachar on Wednesday November 20, 2019 @05:51AM
(#21582743)
Ambiguity. Two file names with the single difference that one has a breaking space and another a non- breaking space.
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by kryptiskt on Tuesday November 19, 2019 @07:46AM
(#21572405)
Filenames in most Unix derivatives is an arbitrary bag of bytes only excluding '/' and '\0', they don't even have to have a valid encoding. If you can handle that spaces are the least of your concerns. Tools should be able to handle them by now, one would think.
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by ajdlinux on Tuesday November 19, 2019 @01:18AM
(#21571013)
You're over 20 years too late to propose this.
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by enriquto on Tuesday November 19, 2019 @03:54AM
(#21571544)
We can move gradually towards this, not that there's anything lost besides a lot of time writing absurd quotes so that your script "supports spaces"
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by colordrops on Monday November 18, 2019 @11:18PM
(#21570622)
I can't tell if you are being sarcastic.
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by enriquto on Tuesday November 19, 2019 @12:38AM
(#21570875)
i am dead serious about that. Allowing the separator character in filenames is a nightmarish error.
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by pjmlp on Tuesday November 19, 2019 @04:40AM
(#21571688)
Only for tools that are stupid for not being able to handle any kind of filename.
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by enriquto on Tuesday November 19, 2019 @05:48AM
(#21571930)
Yes, like filenames with multiple dots, for example.
I agree that filesystems must allow almost arbitrary filenames. But some characters should definitely be forbidden, like '/', '\n' and ' '.
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by int_19h on Tuesday November 19, 2019 @04:16AM
(#21571611)
The vast majority of users never even see the command line - why should they be dealing with the limitations imposed by it?
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by enriquto on Tuesday November 19, 2019 @04:32AM
(#21571662)
These users would never notice if their filenames are encoded using one type of space or the other inside the filesystem. That's a win-win!
Re:The Language Agnostic, All-Purpose, Incredible, Makefile
by Asooka on Tuesday November 19, 2019 @08:45AM
(#21572712)
The human friendly name should really be metadata on the file anyway. Regular users don't need to deal with raw filesystem internals, we can just say that filenames are identifiers that are always lower case, in the C locale, encoded as utf8 or 16. Any whitespace is not allowed.