9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dan Cross <cross@math.psu.edu>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] bug or a feature?
Date: Wed, 12 Jun 2002 20:07:28 -0400	[thread overview]
Message-ID: <200206130007.UAA16573@math.psu.edu> (raw)
In-Reply-To: Your message of "Wed, 12 Jun 2002 16:49:21 PDT." <4109a95286b1ab5e60c5fff7b21cfa01@collyer.net>

> I've always understood the utility of passing through a failed glob pattern
> to be that some programs do their own globbing (as I recall, find and tar
> are the two main candidates, maybe restor) and if the user forgets
> to (or deliberated doesn't) quote the pattern and it doesn't match anything,
> the program gets to glob it.  How useful this is may depend upon your
> feelings about quoting in general.

The argument around, ``what does quoting mean to me?'' is probably
beyond the scope of this discussion.  Find tends not to be an issue,
since we don't have a find on Plan 9.

> I do think that the current behaviour is more helpful than expanding
> to a null list would be.  If the pattern doesn't match, you've very likely
> made a mistake.  I'd rather have ``cat ?akefile'' print
>
> 	cat: can't open ?akefile: '?akefile' directory entry not found
>
> and exit than have it just sit there reading standard input.

I disagree for reason that the current behavior is ambiguous, as
illustrated by the following example:

term% mkdir t
term% cd t
term% ls
term% touch 'foo?'
term% ls -l
--rw-rw-r-- M 14826 cross cross 0 Jun 12 19:59 foo?
term% echo foo?
foo?
term% echo bar?
bar?
term% echo Rats!
Rats!
term%

Of course, it's probably foolish to name a file, ``foo?'', but one
might imagine contexts in which that happens.  Besides, if the
expansion of the null argument list is propogated into the program's
argument vector, then it will indeed look for something non-existant,
though the error message might be less useful than otherwise.

	- Dan C.

(And while we're at it, can we add ``else'' to Plan 9 rc?)


  reply	other threads:[~2002-06-13  0:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-12 23:49 Geoff Collyer
2002-06-13  0:07 ` Dan Cross [this message]
2002-06-13  0:31 ` Pavel Mihaylov
2002-06-13  2:29 ` Lyndon Nerenberg
  -- strict thread matches above, loose matches on Subject: below --
2002-07-27 20:30 Byron Rakitzis
2002-07-27 12:10 presotto
2002-07-27  2:43 Byron Rakitzis
2002-06-13 23:05 Russ Cox
2002-06-13 23:23 ` Dan Cross
2002-06-13 20:35 Russ Cox
2002-06-13 20:58 ` Dan Cross
2002-06-13 21:34   ` Tharaneedharan Vilwanathan
2002-06-13  3:41 Russ Cox
2002-06-13  1:01 Russ Cox
2002-06-13 17:40 ` Dan Cross
     [not found] <dmr@plan9.bell-labs.com>
2002-06-12 19:57 ` Dennis Ritchie
2002-06-12 20:16   ` Scott Schwartz
2002-06-12 19:52 andrey mirtchovski
2002-06-12 21:57 ` Dan Cross
2002-06-12 22:53   ` Lyndon Nerenberg
2002-06-14  8:45     ` Douglas A. Gwyn
2002-06-14 16:23       ` Lyndon Nerenberg
2002-06-12  9:15 forsyth
2002-06-13  9:29 ` Douglas A. Gwyn
2002-06-11 15:32 Russ Cox
2002-06-11 15:29 rob pike, esq.
2002-06-11 21:05 ` andrey mirtchovski
2002-06-11 21:19   ` Ronald G Minnich
2002-06-12  5:17     ` Lucio De Re
2002-06-12  8:53 ` Douglas A. Gwyn
2002-06-11 15:26 andrey mirtchovski
2002-06-11 15:14 andrey mirtchovski

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=200206130007.UAA16573@math.psu.edu \
    --to=cross@math.psu.edu \
    --cc=9fans@cse.psu.edu \
    /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).