Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

problem with context specification



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


Messages sorted by: Reverse Date, Date, Thread, Author