Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Glob Qualifier Yn enables short-circuit mode behaves oddly
On 3/11/22, zzapper <zsh@xxxxxxxxxxxxxx> wrote:
> Hi
>
> > print *(.omY3)
>
> notebash.txt note132.txt note020.txt
>
> I don't know why it's selected those 3 files but it always does
>
>
> Yn
>
> 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.
You've included the answer in your mail, Y3 will stop looking at files
after finding 3 in directory traversal order, those 3 files are then
sorted according to their modification timestamp. If you want to
consider all files in the directory, use [3] instead of Y3.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author