Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: several messages

[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

The really bad case is

	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.

Messages sorted by: Reverse Date, Date, Thread, Author