rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Emin Gun Sirer <egsirer@phoenix.Princeton.EDU>
To: alan@oldp.astro.wisc.edu
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re:  bug in globber?
Date: Sat, 22 May 1993 19:46:36 -0400	[thread overview]
Message-ID: <199305222346.AA29247@phoenix.princeton.edu> (raw)

>rc doesn't seem to be able to glob through a directory without having
>read permission; sh can.

I think (and Byron can correct me if I'm wrong) this is because rc globs
all the elements of a path if there is globbing anywhere within it. That
is, given "foo/../foo*" rc will first match "foo" against everything in ".",
".." against everything in foo (for which it needs read permission) and
"foo*" against stuff in "foo/..". 

This was done to keep the implementation simple and rc's globber works
correctly, which is a lot more than what one could say about some other
shells.

If this is not changed, perhaps it should be documented. I believe the
comment regarding globbing disappeared some time between 1.2 and 1.4.
If someone spends the time to fix this AND NOT BREAK anything else, so
much the better.

Judging by the comments in 1.4beta (which I am running), there seems to
be code to check for metacharacters in each path element and glob only
occasionally; however, trace still shows that every directory on the path
is read.

Gun.

P.S. Someone forgot to add the controversy about hash not introducing a
comment if it is not preceded by white space (e.g. lpr -#2), my personal
pet peeve, to the wish list.


             reply	other threads:[~1993-05-22 23:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-22 23:46 Emin Gun Sirer [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-23  4:31 Paul Haahr
1993-05-22 17:13 Alan Watson

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=199305222346.AA29247@phoenix.princeton.edu \
    --to=egsirer@phoenix.princeton.edu \
    --cc=alan@oldp.astro.wisc.edu \
    --cc=rc@hawkwind.utcs.toronto.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).