Date: Sat, 17 May 1997 10:04:03 -0400 (EDT) From: "Mike A. Harris" Reply-To: "Mike A. Harris" To: pierre AT tycho DOT com cc: OpenDOS Mailing List Subject: Re: BIG suggestion for Opendos Features In-Reply-To: Message-ID: Organization: Total disorganization. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 7 May 1997, Pierre Phaneuf wrote: > On Wed, 7 May 1997 yeep AT xs4all DOT nl wrote: > > > > I'd love full case sensitivity that can be turned off (collisions handled > > > through mangling). Case preservation is undiscutable. PLEASE, for the > > > command-line users among us (that's Open*DOS*, right?), don't let spaces > > > characters creep in! > > > > If you don't want spaces, don't use them. > > You can use spaces on EXT2, but I've never seen anybody do it. > > Well aside from myself then, but I quit doing it, 'cos it sucked big time. > > How do you do spaces in filenames in Linux? How does bash reacts to this? > And the fileutils (like ls)? Anyway, quoting a filename is losing IMHO, so > spaces should be out... ;-) capslock:~# touch "spaced filename" capslock:~# ls -q spaced filename capslock:~# ls -b spaced\ filename There you go. Also, if you press TAB for filename completion, it "quotes" those filenames for you. Or else you can escape the spaces with a backslash. The problem with spaces in filenames is that: 1) Spaces on the command line are interpreted as argument delimiters and hence utilities like rm, ls, mv, cp, etc... interpret a spaced filename as 2 or more separate filenames unless you quote the filename so it is treated as a single entity, or escape the spaces with backslashes. 2) Some people don't like having to quote such filenames or escape them, and hence don't like spaced filenames (myself included) 3) Some people want spaced filenames, don't want to quote them and for some strange reason can't understand why the hell they HAVE NO CHOICE but to quote them. This primarily stems from the fact that they don't understand the shell OS/FS/shell, and the way command lines work. That is their problem, if they use spaced filenames and don't like quoting, then they can stop using them, or stay in a GUI. 4) Some people use spaced filenames, like them, and don't care if anyone else likes them or not. Since W95 exploits the use of spaces in filenames, this is not surprizing. What it boils down to is that, there ARE filesystems that allow spaces in filenames, and that if an OS is going to allow using such a filesystem, then it must support spaces in filenames for that filesystem. Also, as a result, other programs including the shells, must also be capable of dealing with any filenames that come up, and thus quoting or escaping is absolutely necessary. Therefore we must support the usage of spaces for backwards compatibility. However due to the difficulties and headaches involved with such filenames, their usage should be heavily discouraged. Those that adamantly want to use spaced filenames are going to be stuck having to quote or escape them at the command line period. Filename completion will minimize this somewhat, however quoting is the only way. Otherwise consider this: #ls filename spaced spaced\ filename #rm spaced filename What should happen? Should rm delete "spaced filename" or should it delete "spaced" and "filename"? The normal operation of rm would do the latter, and this is expected behaviour. Unfortunately, some poor user is going to complain and say "It SHOULD have deleted "spaced filename". Well that is not true, read the documentation on rm. The arguments to rm are a list of filenames separated by spaces which are to be deleted. This whole space thing is rediculous. One of only 2 outcomes is going to happen: 1) Spaces will be allowed in filenames and will need to be quoted or escaped at the command line. 2) Spaces will not be allowed in filenames and filenames containing spaces in mounted filesystems that allow spaces will have to be name-mangled. Any other realistic possible outcomes? Mike A. Harris | http://blackwidow.saultc.on.ca/~mharris Computer Consultant | Coming soon: dynamic-IP-freedom... My dynamic address: http://blackwidow.saultc.on.ca/~mharris/ip-address.html Email: mharris at blackwidow.saultc.on.ca <-- Spam proof address Want to know how to let people connect to your computer over the internet?