4 ms·
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 f
by enriquto 7y ago
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.
- jobigoud 7y ago> 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?
- emiliobumachar 7y agoAmbiguity. Two file names with the single difference that one has a breaking space and another a non- breaking space.
- colordrops 7y agoI can't tell if you are being sarcastic.
- enriquto 7y agoi am dead serious about that. Allowing the separator character in filenames is a nightmarish error.
- int_19h 7y agoThe vast majority of users never even see the command line - why should they be dealing with the limitations imposed by it?
- enriquto 7y agoThese 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!
- pjmlp 7y agoOnly for tools that are stupid for not being able to handle any kind of filename.
- enriquto 7y agoYes, 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 ' '.
- deleted 7y ago[deleted]
- ajdlinux 7y agoYou're over 20 years too late to propose this.
- enriquto 7y agoWe 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"
- kryptiskt 7y agoFilenames 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.
- Asooka 7y agoThe 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.
- enriquto 7y agomy point exactly!