Re: trivial syntax issue
dana <[email protected]> Wed, 06 May 2026 16:34:53 -0500
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed 6 May 2026, at 16:04, Ray Andrews wrote: > % [[ (zzz*(N)) ]] && echo TRUE > TRUE > > ... I'd expect the 3d line to work as a naive simplification but it > returns true every time. Can it be fixed? from zshmisc(1), conditional expressions: Filename generation is not performed on any form of argument to conditions. However, it can be forced in any case where normal shell expansion is valid and when the option EXTENDED_GLOB is in effect by using an explicit glob qualifier of the form (#q) at the end of the string. A normal glob qualifier expression may appear between the =E2=80= =98q=E2=80=99 and the closing parenthesis; if none appears the expression has no effect beyond causing filename generation. The results of filename generation are joined together to form a single word, as with the results of other forms of expansion. iow, use [[ zzz*(#qN) ]] (the extra (...) are superfluous) dana