9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Ugly hack
Date: Sun, 16 Feb 2003 11:20:13 +0200	[thread overview]
Message-ID: <20030216112012.L9084@cackle.proxima.alt.za> (raw)
In-Reply-To: <0043a6a833ad0d4ab1079c5a650c3b23@collyer.net>; from Geoff Collyer on Sat, Feb 15, 2003 at 03:56:28PM -0800

On Sat, Feb 15, 2003 at 03:56:28PM -0800, Geoff Collyer wrote:
>
> 	echo */.
>
> would work on Unix, but on Plan 9 matches all files in the current directory
> (fallout from use of cleanname, perhaps?).  However,
>
A small fix to my hack:

	while(Readdir(f, namep, dironly||namep[1]!=0)){
				       ^^^^^^^^^^^^^

(adding a check for a trailing component) has the dual effect of
fixing the above inconsistency and, hopefully, speed up the expansion
by considering only directories if there is a subsequent component.

There may be implications I have overlooked.  I think the code should
be revised, if the objective seems worthwhile, rather than hacked, but
that's a decision for the _real_ developers.

++L


  reply	other threads:[~2003-02-16  9:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-15 15:46 Lucio De Re
2003-02-15 16:18 ` Sam
2003-02-15 16:21   ` Dan Cross
2003-02-15 16:29   ` Lucio De Re
2003-02-15 23:56 ` Geoff Collyer
2003-02-16  9:20   ` Lucio De Re [this message]
2003-02-16  9:25     ` Lucio De Re
2003-02-16 12:18       ` Lucio De Re
2003-02-16 12:45         ` Lucio De Re
2003-02-16 14:19 ` Russ Cox
2003-02-16 15:00   ` Lucio De Re
2003-02-16 15:31     ` David Butler
2003-02-16 15:40     ` Russ Cox
2003-02-17  5:27       ` Lucio De Re
2003-02-17  9:53 ` John Kodis

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=20030216112012.L9084@cackle.proxima.alt.za \
    --to=lucio@proxima.alt.za \
    --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).