zsh-workers
 help / color / mirror / code / Atom feed
* Re: several messages
       [not found] <20040517150623.GG7161@ay.vinc17.org>
@ 2004-06-05 20:26 ` Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2004-06-05 20:26 UTC (permalink / raw)
  To: Zsh hackers list; +Cc: Vincent Lefevre

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-05 20:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040517150623.GG7161@ay.vinc17.org>
2004-06-05 20:26 ` several messages Bart Schaefer

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