by tmhedberg · 13y ago · 0 comments
It can, if you set the `globstar` option:
$ shopt -s globstar
$ echo **/*.txt
a/a2/baz.txt a/bar.txt a/foo.txt b/bar.txt b/foo.txt $ setopt brace_ccl #put this in your ~/.zshrc
$ echo {1-3}.pdf {a-d}.pdf
1.pdf 2.pdf 3.pdf a.pdf b.pdf c.pdf d.pdf $ echo {1..3}.pdf {a..d}.pdf
1.pdf 2.pdf 3.pdf a.pdf b.pdf c.pdf d.pdf <7-10>.txt
to match 7.txt, 8.txt, 9.txt and 10.txt. Zero-padding is loose. 07.txt and 08.txt match also, for instance. The bash {..} syntax just doesn't handle this variable 0-padding case, which is extremely common when looking at a directory full of photos, for instance.