zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: PATCH: allow default match specs to be disabled (was Re: [PATCH v4] zsh localedef completion)
Date: Mon, 20 Jun 2016 16:13:27 +0200	[thread overview]
Message-ID: <15696.1466432007@thecus.kiddle.eu> (raw)
In-Reply-To: <160619091803.ZM1176@torch.brasslantern.com>

Bart wrote:
> } This patch uses x: as the token. Any thoughts on that or alternative
> } suggestions?
>
> My only other thought would be a single hyphen or a single exclamation
> point, for similarity with the tag-order style, 

A single hyphen wouldn't be a good idea because _wanted and similar
helpers look for a single hyphen to indicate where they should insert
the explanation options. The way ! is used in tag-order is somewhat
different. Do you have a preference for it as such?

>   * it matters that the global matcher is prepended to matcher-list
>      rather than appended

By global matcher do you mean the "matcher" style; it is only global
if specified with a very general context. What is your source for that
statement? The only line of documentation I've found that implies that
comes from a clarification patch in users/18550. It originally used
the wording "added to".

> What is it that leads you to think it's order-independent?

Well the word "order" is absent from the "Completion Matching Control"
section of the manual. And I can't think of a way for one matching spec
to affect another.

> I have this comment in my .zshrc:
>
> zstyle ':completion:*' matcher-list '' 'r:|[-._,]=** r:|=**' \
>     'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._,]=** r:|=**' \
>     'r:|[-._,]=** r:|=** l:|=*'

> Maybe I'm misunderstanding your question.

Yes, my question concerned only the order of match specifications as they
are passed to compadd -M within a single string. So is there, for example,
any difference between
  -M 'r:|[-._,]=** r:|=**' and
  -M 'r:|=** r:|[-._,]=**'

The order of matcher-list arguments clearly does matter - _main_complete
(or _prefix) looks them up and tries them one after the other in order.
But within an argument, can the order of the various r: and m: specs
matter? I'm fairly sure the answer is no.

Oliver


  reply	other threads:[~2016-06-20 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 15:17 [PATCH v4] zsh localedef completion Marko Myllynen
2016-06-14  2:07 ` Eric Cook
2016-06-14  9:31   ` Oliver Kiddle
2016-06-16  2:21     ` Eric Cook
2016-06-18 21:17       ` PATCH: allow default match specs to be disabled (was Re: [PATCH v4] zsh localedef completion) Oliver Kiddle
2016-06-19 16:18         ` Bart Schaefer
2016-06-20 14:13           ` Oliver Kiddle [this message]
2016-06-20 15:10             ` Peter Stephenson
2016-06-20 15:23               ` 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=15696.1466432007@thecus.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).