Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2001 00:40:42 -0500
From:      Mike Meyer <mwm@mired.org>
To:        gkshenaut@ucdavis.edu
Cc:        hackers@FreeBSD.ORG
Subject:   Re: ALT-<sp> (Was: how to make 'for' understand two words as a single argumen) 
Message-ID:  <15290.42202.766797.460932@guru.mired.org>
In-Reply-To: <200110021841.f92IfVS07537@thistle.bogs.org>
References:  <20011002185518.A335@firedrake.org> <200110021841.f92IfVS07537@thistle.bogs.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Shenaut <greg@bogslab.ucdavis.edu> types:
> In message <20011002185518.A335@firedrake.org>, void cleopede:
> >On Tue, Oct 02, 2001 at 07:19:37AM -0700, Greg Shenaut wrote:
> >> Is there any reason why the "unbreakable space" (0xa0) shouldn't b=
e
> >> the only kind of space character used/allowed in filenames?
> >Any character except for '/' is allowed in filenames, and I believe =
it's
> >been that way since the dawn of time.

You can't use nul either, and both have been true since v6.

> Yes, but I mention it because if 0xa0 were used instead of space
> in filenames, then they wouldn't be split into several arguments
> and nothing special would need to be done in "for=A0x=A0in=A0*=A0;" l=
oops
> or elsewhere to handle them, but the names would still look the same
> to users.

All the other characters that are magic to the shell - newline being
the obvious example - will still cause problems. If you're going to
use this to solve the problem, you need to go to something live VMS or
MVS, and limit file names to alphanumerics plus a small set of
delimiters.

The usual solution for this kind of thing is to extend the
shell. Shell scripts kept breaking trying tod deal with arguments with
strange characters in them until the "$@" mechanism was added. I
wonder how many scripts would break - or stop breaking :-) if we
changed the shell so that "*" expanded like "$@"?

=09<mike
--
Mike Meyer <mwm@mired.org>=09=09=09http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?=09=09A: Tell them your plans.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15290.42202.766797.460932>