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

Re: problem with context specification



On Tue, 2020-01-14 at 16:45 +0000, Daniel Shahaf wrote:
> > I assume the stars are for matching every possible value for that segment,
> No.  An asterisk matches zero or more characters, _including colons_.
> (My patch said that explicitly.)

This can certainly be a right pain.  If we'd thought about it at the
time, we might have made the convention that separators are /s and we
can turn on per-path matching for this case (actually not as trivial as it
might sound because currently that's heavily specific to managing file
paths, so we'd need an extra zstyle-specific loop in any case).

I guess there might still be room for an option that does this in some
clever way, though it'll only be useful if it can do it with colons.

Still not foolproof, though, as if extra segments ever appear you
can end up with a failed match for no good reason.  So I'm not
sure how advisable it would be to unleash this on users.

This can be filed under "probably won't ever actually happen".

pws



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