Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is this a bug?
- X-seq: zsh-users 27671
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Cc: Perry Smith <pedz@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Is this a bug?
- Date: Tue, 19 Apr 2022 14:06:44 -0700
- Archived-at: <https://zsh.org/users/27671>
- In-reply-to: <CAHYJk3ReponW2rTV7OBG_sAxXoDhWm6Ds68QujEF-p=weRhd4Q@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <F5B10854-2086-43AE-9077-EC071034BFBC@easesoftware.com> <CAH+w=7aF2YLcsc2upXQnMosacNZ5SffhaOa0g-W7t73zhy=iOw@mail.gmail.com> <292BA5B4-7D2C-4D2F-8C45-EE599D4A43D6@easesoftware.com> <CAH+w=7ZPORLXe2VrkLPwJk=0LH+gnRjqZ5kLq+J9mAog=reYaQ@mail.gmail.com> <CAHYJk3ReponW2rTV7OBG_sAxXoDhWm6Ds68QujEF-p=weRhd4Q@mail.gmail.com>
On Tue, Apr 19, 2022 at 10:13 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> Hmm?
> % mkdir -p {a,Volumes}/{b,Volumes}/{c,Volumes}
> % print -l ((^Volumes)/)#
> a/
> a/b/
> a/b/c/
Sure, but try ((^Volumes)/)#/ and suddenly you're recursing from the root.
For Perry's specific use case, ./((^Volumes)/)#/ is OK, because he
only cares about directories, bad things can happen if you end that
with another glob. I discounted ./((^Volumes)/)#/(^Volumes) but
that's because it runs afoul of bare_glob_qual, it works if you unset
that or append some other qualifier to force (^...) to be taken as a
pattern.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author