zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@zanshin.com>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Cc: Vincent Lefevre <vincent@vinc17.org>
Subject: Re: several messages
Date: Sat, 5 Jun 2004 13:26:01 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0406051301320.18277-100000@toltec.zanshin.com> (raw)
In-Reply-To: <20040517150623.GG7161@ay.vinc17.org>

[Still catching up after 3 weeks out of the country.]

[Vincent, I was not sure whether you're on zsh-workers, so I copied you.]

On Fri, 14 May 2004, Peter Stephenson wrote:

> Or how about this alternative?
> 
> +If the option TT(EXTENDED_GLOB) is set, then tt(*#) is treated as a
> +shorthand for tt(**/*), and tt(**#) and tt(*##) are treated as shorthands
> +for tt(***/*).  Hence tt(*#.c) matches any file ending in tt(.c) in or
> +below the current directory, not following symbolic links.

That's much better, though I'm wondering about those semantics for *##.
I'd be more inclined to have *# == **/* and *## == */**/*, or something
like that.  Then **## == */***/*.

On Mon, 17 May 2004, Vincent Lefevre wrote:

> [I, that is, Bart, wrote:]
> > 	foo='x*'
> > 	print ${~foo}*
> 
> Then there's a problem with **/ :
> 
>   foo='*'
>   print ${~foo}*/

Yes, you're right, but I can't travel back 14 years to stop PF from
introducing **/ in the first place -- not that I'd want to, it's quite
useful -- whereas I _can_ suggest that we not make the situation any
worse.

The really bad case is

	foo='*/'
	print *$~foo

and I'm still wary of the consequences of foo='#' with extendedglob, but
again it's too late to point out that there's also a reason why globbing
did not use regular expression suffix-operator syntax.

This suggests that perhaps ${~foo} should be treated for globbing purposes
as if it had parens around it, but given arrays, the order of expansions,
and other possible uses of the tilde "qualifier," there's probably no way
to achieve that semantic.


           reply	other threads:[~2004-06-05 20:29 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20040517150623.GG7161@ay.vinc17.org>]

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=Pine.LNX.4.44.0406051301320.18277-100000@toltec.zanshin.com \
    --to=schaefer@zanshin.com \
    --cc=vincent@vinc17.org \
    --cc=zsh-workers@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).