zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: list-colors style using the more general one
Date: Fri, 18 Oct 2019 18:59:02 +0200	[thread overview]
Message-ID: <2567-1571417942.977382@E4Gc.jiiO.tvw4> (raw)
In-Reply-To: <CAKc7PVCnBSvMsFa_G8HY++hQc2LOQZMShuVLjmhc_cYB+qGB7A@mail.gmail.com>

Sebastian Gniazdowski wrote:
> I'm using the following zstyle:
>
> zstyle ':completion:*:zplugin:argument-rest:plugins' list-colors
> '=(#b)(*)/(*)==1;35=1;33'
>
> It is working fine, i.e. colorizes the completed results, until I also
> issue the following zstyle:
>
> zstyle ":completion:*" list-colors ???${(s.:.)LS_COLORS}???

Does it help if you use ':completion:*:default' as the context here?
And does that affect other things like the directory completion.

If you don't set the group-name style, that could also be important as
complist doesn't know about tags and uses group names.

Looking at the _zplugin on github, I think you should also be declaring
  local curcontext="$curcontext"
at the top of the function. Declaring context local is not needed. This
is because you pass -C to _arguments. This probably doesn't matter but
with it, I have more confidence that the context is correct.

> Why would a more general style block the more specific one?

It wouldn't.

But, if you follow a debug trace from _complete_debug, you should see
it looking up list-colors with many different styles and collating them
all in _comp_colors. The whole of _comp_colors is used at the end.
It will have done a lookup with other contexts that will match *, e.g:
  :completion::complete:zplugin:argument-rest:argument-rest

The final _comp_colors will have ???${(s.:.)LS_COLORS}??? multiple times
and your '=(#b)(*)/(*)==1;35=1;33' entry at the end. I'm not sure why
this doesn't work in spite. There must be something in LS_COLORS that
the complist module then doesn't like. Perhaps some new codes. It'd be
good to track down which exactly. Or perhaps it doesn't like the
duplication.

Oliver

  reply	other threads:[~2019-10-18 17:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 13:46 Sebastian Gniazdowski
2019-10-18 16:59 ` Oliver Kiddle [this message]
2019-10-18 18:35   ` Sebastian Gniazdowski

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=2567-1571417942.977382@E4Gc.jiiO.tvw4 \
    --to=okiddle@yahoo.co.uk \
    --cc=sgniazdowski@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).