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

Re: [PATCH] Re: (Y) modifier: up to N matches?

On Jun 4,  4:16pm, Bart Schaefer wrote:
} I verified by comparing the output of **/*(odoN) vs **/*(oN) that they
} may in fact differ. I didn't dig into exactly how or why.

It appears that **/*(od) returns files in subdirectories first regardless
of any other sort flags, including (oN) which applies only to the files
within each subdirectory and to subdirectories of the same parent with
relation to each other.

Similarly (Od) displays local names first, though they may otherwise be
unordered (or at leat not predictably ordered).  Even without **/ as a
prefix, (odoN) is a different order than (oN).  This must be because an
unstable qsort is applied even though it theoretically compares all names
as equivalent.
} More later when I have time to peruse the patches.

Both patches look sane and simple enough.  My only quibble with the
second (1<<GF_NONE) patch is that by enumerating the states it becomes
necessary to edit this again if a new sort order is introduced, but
that doesn't happen very often so is probably moot.

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