From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Zsh-Users List <zsh-users@zsh.org>
Subject: problem with context specification
Date: Mon, 13 Jan 2020 17:46:09 +0100 [thread overview]
Message-ID: <CAP+y1xCU8W9uhsx3Xz+3J-8MVMT8Ve69M2EFByd5ZQONKaDY=g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]
Hello, I am trying to define a style for a completion command different
from the more general style, but I am failing to override the style for
this specific command.
I have this declaration:
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' 'm:{a-z}={A-Za-z}
r:|[._-]=* r:|=*' 'm:{a-z}={A-Za-z} l:|=* r:|=*'
that is how I would like general completion to work in regard to he
matcher-list style
For the episodes command I would like to override this style, and set it to:
zstyle ':completion:*:*:episodes:*:*' matcher-list 'm:{a-z}={A-Za-z} l:|=*
r:|=*'
but this doesn't seem to match when i try completion pressing tab after the
episodes command.
if I substitute this as the general case, eg:
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z} l:|=* r:|=*'
then everything get this style, so the syntax is correct. it seem that what
is wrong is the pattern.
I tried some variations of it, with no success:
zstyle ':completion:*:*:episodes:*' ...
zstyle ':completion:*:episodes:*' ...
my main problem is that I don't really understand the pattern syntax, and
haven't been able to find a man page detailing it (the documentation on the
zstyle builtin doesn't explain it), so I basically try random variations.
Using ctrl-x h after episodes on the command line it gives:
tags in context :completion::complete:episodes::
argument-rest (_arguments _episodes)
so I've tried:
zstyle ' :completion::complete:episodes::'
but still to no effect, and also the lack of * seems a little suspicious
any help on this is appreciated, thanks
Pier Paolo Grassi
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO
next reply other threads:[~2020-01-13 16:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200113164758eucas1p17ea364450eec705f49edaa8fb69fa65b@eucas1p1.samsung.com>
2020-01-13 16:46 ` Pier Paolo Grassi [this message]
2020-01-13 16:56 ` Peter Stephenson
2020-01-13 17:46 ` Mikael Magnusson
2020-01-14 11:52 ` Peter Stephenson
2020-01-13 17:53 ` Bart Schaefer
2020-01-13 17:06 ` Daniel Shahaf
2020-01-13 17:41 ` [PATCH] docs: Add an example of setting and querying zstyles (was: Re: problem with context specification) Daniel Shahaf
2020-01-14 15:59 ` problem with context specification Pier Paolo Grassi
2020-01-14 16:45 ` Daniel Shahaf
2020-01-14 17:55 ` Pier Paolo Grassi
2020-01-14 18:05 ` Peter Stephenson
2020-01-14 18:34 ` Bart Schaefer
2020-01-14 18:50 ` Daniel Shahaf
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='CAP+y1xCU8W9uhsx3Xz+3J-8MVMT8Ve69M2EFByd5ZQONKaDY=g@mail.gmail.com' \
--to=pierpaolog@gmail.com \
--cc=zsh-users@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).