zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: "fake" style requires at least one real match?
Date: Fri, 04 Nov 2016 15:00:03 +0100	[thread overview]
Message-ID: <24199.1478268003@hydra.kiddle.eu> (raw)
In-Reply-To: <161103173955.ZM13768@torch.brasslantern.com>

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


  reply	other threads:[~2016-11-04 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04  0:39 Bart Schaefer
2016-11-04 14:00 ` Oliver Kiddle [this message]
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=24199.1478268003@hydra.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --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).