Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Re: (Y) modifier: up to N matches?
- X-seq: zsh-workers 32710
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Re: (Y) modifier: up to N matches?
- Date: Wed, 04 Jun 2014 21:45:09 -0700
- In-reply-to: <CAH+w=7YJ0Y8qO3j_z4e_7cHQ857GyFOr6PXqAdvBEgUj=uhV6Q@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20140602182346.GB1858@tarsus.local2> <140602204603.ZM26905@torch.brasslantern.com> <20140604020804.GA2032@tarsus.local2> <140603234229.ZM29030@torch.brasslantern.com> <20140604230835.GD1970@tarsus.local2> <CAH+w=7YJ0Y8qO3j_z4e_7cHQ857GyFOr6PXqAdvBEgUj=uhV6Q@mail.gmail.com>
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