Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] docs: clarify Yn globqual explanation



the documentation for the Yn glob qualifier says:

> enables short-circuit mode: the pattern will expand to at most n
> filenames. If more than n matches exist, only the first n matches in
> directory traversal order will be considered.
>
> Implies oN when no oc qualifier is used.

this is accurate but it feels confusing to me -- like it could suggest
that it will *not* return matches in traversal order and instead use the
one specified by a sorting qualifier if given. but that's not the case

maybe this is clearer

dana


diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 2dc69eb1e..445a15448 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -3099,7 +3099,9 @@ enables short-circuit mode: the pattern will expand to at most var(n)
 filenames.  If more than var(n) matches exist, only the first var(n)
 matches in directory traversal order will be considered.
 
-Implies tt(oN) when no tt(o)var(c) qualifier is used.
+Any sorting specified with an tt(o)var(c) or tt(O)var(c) qualifier is
+applied em(after) the var(n) matches are returned; tt(oN) is implied
+otherwise.
 )
 item(tt(o)var(c))(
 specifies how the names of the files should be sorted. The following values




Messages sorted by: Reverse Date, Date, Thread, Author