Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
memory usage with + / e glob qualifiers
- X-seq: zsh-workers 55200
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: memory usage with + / e glob qualifiers
- Date: Fri, 9 Oct 2026 12:39:48 +0100
- Archived-at: <https://zsh.org/workers/55200>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
Hi,
I was surprised to find out that globs such as **/*(N+false)
that expand to nothing end up using more memory than **/*
according to time's %M
It's even worse when combined with -:
$ du --count-links --inodes --summarize
675285 .
$ (TIMEFMT=%M; time zsh -c ': **/*(N+false)')
225176
$ (TIMEFMT=%M; time zsh -c ': **/*(N-+true)')
370828
$ (TIMEFMT=%M; time zsh -c ': **/*')
159624
With another glob that expands to nothing without using the +
qualifier:
$ (TIMEFMT=%M; time zsh -c ': **/*(N./)')
48176
Similar with the e qualifier:
$ (TIMEFMT=%M; time zsh -c ': **/*(N-e[])')
233312
What could explain that?
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author