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

Re: PATCH: short-circuiting glob exclusion operator



On Apr 9,  8:51pm, Peter Stephenson wrote:
} Subject: Re: PATCH: short-circuiting glob exclusion operator
}
} On Sat, 9 Apr 2016 21:00:36 +0200
} Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
} > The only argument against this syntax (and I'm not saying it's a
} > strong argument) is that you have to choose between being able to
} > shortcircuit a subtree, or excluding a particular match that happens
} > to be a directory (while still including children of that directory).
} 
} They're not actually in competition; I meant to ensure it was possible
} to specify both, which I've done.

I think Mikael is asking about specifying both conditions in the *same*
glob pattern, i.e. **/*~*/foo~*/bar(Y-) such that bar directories are
short-circuited whereas only paths ending in foo are excluded, but any
files below a directory foo remain.  Your doc and the comments about
treating multiple ~ as if they were | seem to imply that both foo and
bar would be short-circuited in this example.

Of course one can still write **/*~*/foo~*/bar/* without (Y-).



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