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

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

Bart wrote:
> On Jun 4, 2014 4:08 PM, "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > What would (odoN) do?  It produces the same output as (oN) alone, since
> > presence of (oN) causes any other sort qualifiers to be ignored.
> 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.

Are the sort flags actually affecting the order in which directories are
visited or only the order in which matches are output? Considering uses
of the new (Y) modifier as I've understood it: I commonly use (../)# to
find the top-level of something. For example (../)#.git(:h) will find
the top of a git checkout. It'd be useful if this would stop searching
after the first match which should be the one that involves going up as
few directories as possible. I'm also inclined to think that with
downward globs that you'd want it to find the nearest match so checking
files before directories.


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