Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Inconsistent behavior with comparisons and recursive glob patterns
- X-seq: zsh-workers 52916
- From: Alan Wagner-Krankel <awk@xxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Inconsistent behavior with comparisons and recursive glob patterns
- Date: Wed, 8 May 2024 00:59:50 -0500
- Archived-at: <https://zsh.org/workers/52916>
- In-reply-to: <5381099.1319055.1715094514425@mail.virginmedia.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAGZNKjL2cJhLopFPAFFTewh2cHxX+_L4vMx2Nf9bAS0ud58RBw@mail.gmail.com> <c97c8fe9-2f56-45b7-bfb2-9f2a97283859@gmx.com> <CAGZNKj+TUjbmJLBWV7Rysh0Bs5h=n1e74ukb0rsQye5+5=jBcQ@mail.gmail.com> <1388695268.1045346.1714552728211@mail.virginmedia.com> <CAGZNKjJODu=hz0=x=E4ypouGbGxa2sgSfDJ=TMHQeCk_XgEVaA@mail.gmail.com> <5381099.1319055.1715094514425@mail.virginmedia.com>
Excellent. It's succinct and conveys the necessary information.
Thanks,
Awk
On Tue, May 7, 2024 at 10:08 AM Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
>
> > On 05/05/2024 07:33 BST Alan Wagner-Krankel <awk@xxxxxxxxxxx> wrote:
> > I think there's some risk that "... '*' may match one or more '/'
> > characters" could be misinterpreted as "... '*' may *only* match one
> > or more '/' characters".
> >
> > Maybe:
> > the patterns `tt(**/)' and `tt(***/)' behave the same as `tt(*/)',
> > i.e. as a standard wildcard tt(*) that could match any set of zero or
> > more characters (including `tt(/)'), followed by a `tt(/)'.
>
> Hmm, I'd perhaps limit that to only the information we wish to add to
> keep it simple...
>
> pws
>
> diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo
> index 000e576..c58aea6 100644
> --- a/Doc/Zsh/cond.yo
> +++ b/Doc/Zsh/cond.yo
> @@ -241,7 +241,11 @@ ifnzman(\
> noderef(Filename Generation)\
> )\
> , but there is no special behaviour
> -of `tt(/)' nor initial dots, and no glob qualifiers are allowed.
> +of `tt(/)' nor initial dot, and the patterns `tt(**/)' and `tt(***/)' behave
> +the same as `tt(*/)', in which the `tt(*)' has its standard behaviour
> +but may also match further `tt(/)' characters. Also, no bare glob
> +qualifiers are allowed, though the form `((#q)var(...))' is allowed as
> +shown above.
>
> In each of the above expressions, if
> var(file) is of the form `tt(/dev/fd/)var(n)',
Messages sorted by:
Reverse Date,
Date,
Thread,
Author