3 ms·
Whitespace should have been banned from filenames decades ago. If you need 'whitespace', use a hyphen or an underscore.
by milesrout 10y ago
Whitespace should have been banned from filenames decades ago. If you need 'whitespace', use a hyphen or an underscore.
- oneeyedpigeon 10y agoI agree, if you ever want whitespace to have any special meaning in your shell (and you do), allowing spaces within filenames just causes no end of headaches.
- ygra 10y agoFor interactive use, tab completion already takes care of the escaping. For anything else the actual headache is that things are passed around as strings and command argument parsing is done for the expanded string where spaces can cause different argument parsing unexpectedly. This is certainly not limited to filenames but any argument that can contain spaces and is passed to a different command without proper quoting. The very fact that it's so easy to get wrong is perhaps a sign that things are a bit broken. But not necessarily at the filesystem level ...
- Khaine 10y agoNo, file names should describe the file. hyphens and underscores are hacks. Systems should be better at handling files with unicode characters and spaces. Its the fault of the shell that whitespace has been overloaded, not filenames.
- to3m 10y agoBut whitespace was banned from file names decades ago, and look what happened: people wanted it added in. So it was added in. That's progress! If the shell can't handle this well, the problem is that the shell is not very well designed, and we need something better. Meanwhile, I never have problems with spaces in file names when I'm doing stuff in C++, C#, Python, etc.