From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: "fake" style requires at least one real match?
Date: Thu, 3 Nov 2016 17:39:55 -0700 [thread overview]
Message-ID: <161103173955.ZM13768@torch.brasslantern.com> (raw)
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 ':completion::complete:cd:*' tag-order \
'named-directories:-mine:extra\ directories
named-directories:-normal:named\ directories *'
mydirs=(mydir1 mydir2)
zstyle -e ':completion::complete:cd:*:named-directories-mine' fake \
'reply=($mydirs)'
zstyle -e ':completion::complete:cd:*:named-directories-mine' \
ignored-patterns 'reply=("(${(qkj.|.)nameddirs})")'
Unless at least one of the real matches is excluded from ignored-patterns,
the "comptags" loop in _all_labels makes another pass and re-adds all the
matches that it ignored the first time around. This also affects the
fake-always style, which was intended to explicitly allow ignoring all
the real matches.
There don't appear to have been any changes to _description or _all_labels
in all that time that would affect this, so it must be something in the
internals? There also haven't been any changes to bin_comptags() that
look like they could be the culprit, I don't know where to look next.
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.
next reply other threads:[~2016-11-04 1:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 0:39 Bart Schaefer [this message]
2016-11-04 14:00 ` Oliver Kiddle
2016-11-05 3:48 ` Bart Schaefer
2016-11-05 5:02 ` Bart Schaefer
2016-11-06 6:42 ` Bart Schaefer
2016-11-06 23:42 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=161103173955.ZM13768@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).