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

Re: "fake" style requires at least one real match?



Bart wrote:
> This is essentially the same Q-and-A as from users/10988 almost exactly
> ten years ago.  The difference is that the solution in that message no
> longer works.
>
> zstyle -e ':completion::complete:cd:*:named-directories-mine' \
> ignored-patterns 'reply=("(${(qkj.|.)nameddirs})")'

In my testing, the (q) flag in there is preventing ignored-patterns
from working because the | separators get quoted. My guess is that
(q) was added as a hurried after-thought at the time of users/10988
to allow for special characters in a named directory name. Either that,
or it was tested with only one named directory.
${(kj.|.)nameddirs:q} will work instead.

Also seems odd to restrict the style to the complete completer.

> Also, an aside, _cd doesn't offer named-directories unless there is a
> prefix of the word.  I don't recall if that's a change from the past or
> not.

This is down to the explicit -n "$PREFIX" condition. It was there in _cd
from 3.1.7 so is not a change.

Oliver



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