From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: PATCH: allow default match specs to be disabled (was Re: [PATCH v4] zsh localedef completion)
Date: Sun, 19 Jun 2016 09:18:03 -0700 [thread overview]
Message-ID: <160619091803.ZM1176@torch.brasslantern.com> (raw)
In-Reply-To: <23451.1466284625@thecus.kiddle.eu>
On Jun 18, 11:17pm, Oliver Kiddle wrote:
}
} Turns out it isn't hard to do.
}
} 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,
} There's nothing in the documentation to suggest that the ordering of
} matching specifications has any effect. Is anyone aware of whether it
} perhaps does?
I would expect that it does, for a number of reasons:
* you can group specs to be tried "all the same time" together in
a single quoted string, or have several strings that are to be
tried separately
* specs can begin with a "+" to append them to an existing spec
* it matters that the global matcher is prepended to matcher-list
rather than appended
What is it that leads you to think it's order-independent?
} The documentation of the matcher style was perhaps deceptive in
} indicating that it is tried before matcher-list. The value is merely
} placed before those from matcher-list.
I have this comment in my .zshrc:
# Matching
# 1. Try completion with no alterations (i.e., literal match is best)
# 2. Match substrings separated by dashes, dots, underscores, commas
# 3. As (2) but case-insensitively
# 4. As (2) but allow arbitrary stuff at the beginning of the result
zstyle ':completion:*' matcher-list '' 'r:|[-._,]=** r:|=**' \
'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._,]=** r:|=**' \
'r:|[-._,]=** r:|=** l:|=*'
The behavior I see from completion leads me to believe that later
matchers are not tried if earlier matchers generate a result, e.g.,
"literal match is best" => put empty matcher first.
Maybe I'm misunderstanding your question.
next prev parent reply other threads:[~2016-06-19 16:17 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 [this message]
2016-06-20 14:13 ` Oliver Kiddle
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=160619091803.ZM1176@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).