A question about filename generate

safreya <[email protected]>
Newsgroups gmane.comp.shells.zsh.user
Message-ID <[email protected]>
I'm confused about ** expansion.In the following example:

safreya test % ls --tree
Permissions Size User    Group   Date Modified Name
drwxr-xr-x     - safreya safreya 27 Jul 13:03   .
drwxr-xr-x     - safreya safreya 27 Jul 13:02  ├──  subdir
.rw-r--r--     0 safreya safreya 27 Jul 13:02  │   ├──  filea.aux
.rw-r--r--     0 safreya safreya 27 Jul 13:02  │   ├──  filea.tex
.rw-r--r--     0 safreya safreya 27 Jul 13:02  │   ├──  fileb.aux
.rw-r--r--     0 safreya safreya 27 Jul 13:02  │   ├──  fileb.tex
.rw-r--r--     0 safreya safreya 27 Jul 13:02  │   ├──  filec.aux
.rw-r--r--     0 safreya safreya 27 Jul 13:02  │   └──  filec.tex
.rw-r--r--     0 safreya safreya 27 Jul 13:03  ├──  index.aux
.rw-r--r--     0 safreya safreya 27 Jul 13:03  ├──  index.log
.rw-r--r--     0 safreya safreya 27 Jul 13:03  └──  index.tex
safreya test % setopt extendedglob
safreya test % print -l **/*~**/*.tex
index.aux
index.log
index.tex
subdir
subdir/filea.aux
subdir/fileb.aux
subdir/filec.aux

I notice that index.tex is printed. This means:

1. The first ** expansion include index.tex
2. The second ** expansion not

Why?

I made this example with FreeBSD zsh 5.9.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.