9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Elliott.Hughes@genedata.com Elliott.Hughes@genedata.com
Subject: [9fans] allowing space (ASCII 0x20) in file names
Date: Tue, 14 Apr 1998 11:08:16 +0200	[thread overview]
Message-ID: <19980414090816.TfbLVakV6iczOgogKLneV-F-VVzTXgdzFplOiKMm1vY@z> (raw)

Tom Duff wrote:
> On Apr 8,  1:08pm, Russ Cox wrote:
> > i don't know the official reasons that space isn't allowed,
> > but in general file names with spaces (which you have to deal
> > with in Unix and Windows) are a pain for oodles of reasons.  the most
> > noticeable one is that it messes up scripts and the like:
> > ls -l | awk '{print $10}' is no longer guaranteed to give
> > you filenames.

> ... characters other than letters, digits,
> underscore, minus, plus and dot were so little used that
> forbidding them would not impact any important use of the
> system.  Obviously people stick to those characters to
> avoid colliding with the shell's syntax characters.  I suggested
> (or at least considered) formalizing the restriction, specifically
> to make file names easier to find by programs like awk.

An alternative (taken by a friend of mine in his modified version of
the other rc) is to make the shell glob more carefully. So the file
called "Hello World" globbed as Hello' 'World (in a use of free
careting that I never liked). Actually, free careting means that rc
is the shell in which it's least painful to deal with spaces in
filenames: you don't need to go back to the start of the filename
to insert the quote character that you forgot.

You could easily change the utilities to output filenames in this
protected form. [Personally I thought that '/' as directory separator
was a bad choice compared to DOS' '\\'. I've never seen anyone
want to use '\\' in a filename, but I've seen plenty want to use '/'.]

But I think this is missing the point. Filesystems in the 9P mode are
for programmers, not for users. No-one really cares whether they
have 27 bytes worth of filename or 255 ISO-Latin-1 characters,
or even what the computer has to do to to ensure you can have
chess symbols in filenames: all they're bothered about is whether
or not they can find their files again. Is a simple name the best way
to do this? I'm not convinced that it is.

If you want to implement a collection of repulsive protocols that
assume a certain implementation, write some library functions or
a user-level filesystem to provide this functionality. Despite what
the advertising may have claimed, having 31-character names
or even 255-character names is neither here nor there.

-- 
http://users.ch.genedata.com/~enh/




             reply	other threads:[~1998-04-14  9:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-14  9:08 Elliott.Hughes [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-04-14 15:18 Russ
1998-04-14 15:16 Tom
1998-04-14 13:50 Rob
1998-04-14 13:35 Elliott.Hughes
1998-04-14 13:04 Russ
1998-04-14  9:50 Elliott.Hughes
1998-04-14  6:38 Nigel
1998-04-14  6:24 forsyth
1998-04-14  5:33 forsyth
1998-04-13 23:03 geoff
1998-04-13 13:50 G.David
1998-04-13  6:00 geoff
1998-04-12  3:27 ozan
1998-04-10 14:49 G.David
1998-04-10 14:43 forsyth
1998-04-10  4:04 geoff
1998-04-10  1:03 G.David
1998-04-09 23:44 Tom
1998-04-09 22:08 G.David
1998-04-09  3:10 G.David
1998-04-08 23:56 G.David
1998-04-08 22:05 Rob
1998-04-08 21:54 G.David
1998-04-08 20:32 Russ
1998-04-08 19:58 G.David
1998-04-08 17:45 Tom
1998-04-08 17:08 Russ
1998-04-08 16:56 G.David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980414090816.TfbLVakV6iczOgogKLneV-F-VVzTXgdzFplOiKMm1vY@z \
    --to=elliott.hughes@genedata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).