From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 6865fac4 for ; Fri, 18 Oct 2019 18:37:27 +0000 (UTC) Received: (qmail 1970 invoked by alias); 18 Oct 2019 18:36:43 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24364 Received: (qmail 4317 invoked by uid 1010); 18 Oct 2019 18:36:43 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f48.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25601. spamassassin: 3.4.2. Clear:RC:0(209.85.217.48):SA:0(-2.0/5.0):. Processed in 4.473881 secs); 18 Oct 2019 18:36:43 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.48 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1emDXPBIm3264n3+jxDrS1J6DhHT/Kg8S7znBZOzeFc=; b=KZK6SzXvALe8Lp6ghQVOxxgvGGAfC6qS4rq8vZkkAE3c5oCGplm/1wMjqFyX1NZ3Cr X4qdekJLnB1hcc1ay2V0xR2AWmRWfBIcLYITmnOnIygz/Axaby51RshIqZw9aK52wTBP 564BHaKN0fjk1sqCI2JgGXhQwdAdKSieJffqZD7kawI8UKSp4vQOMKIa8B5RXgqRHmXA 5yBgQAYRg/NB8FjkEOJOZcX0FvKeCtE0WW94c2ACIKBiFEIXEKm63XIyKZecdDHlD+Bl kexPhPAAwMq2GqBQ4k4nSJYxXp+jj5A3gtbKfhFhD28hBeq7M3CUtnEgzwfH7xIPX2tx +LYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1emDXPBIm3264n3+jxDrS1J6DhHT/Kg8S7znBZOzeFc=; b=XAU8I4Mclu5YC1BUHZnFq7M2WwIREERK+qBZq1mYGGNoAzPBKNa3MCFTCRFmKh40Pd gz2Z8vq2fef/bQUuBLPMrTb1NxO2znxXYVZ45AaicUMCGsP5OgXTtvp5HXD9W2gi4ALc RRbJ8JMweIA93iYL/dxZZYK0mUIRaXmQuKQQFYF+w2IJQduqov/NUwXpqEkNkNqXdZXn qzqCN25NhTKn6kyR/52DnNgYbE97fvgQgE3gtuRfFSQD2ARfTwJVEj+8lF7VlGjp5lGu UArqSwUn329izsHzHdkQZ2eKwFfYucoJUB+QwlGnHj9/yGGKiX4VkKRycwBnNPHVV5wB MAEA== X-Gm-Message-State: APjAAAWgII1bbzc/4dmGADL8FSGK+RMboYDWD1h3Qsefo3UpTw/H0NmP S/5uyLnfz7PvUNea3lbCjz1yqW/ckkM7AooxWC713T4m X-Google-Smtp-Source: APXvYqxrj5VkvDVqHUveYhArOP1mWO7qTngbDMq8c6SaqfHMVxGdjVRdD1POda9vw3nHIVdueZttspHLhUz5aprRtIM= X-Received: by 2002:a67:fbd5:: with SMTP id o21mr6214780vsr.147.1571423765592; Fri, 18 Oct 2019 11:36:05 -0700 (PDT) MIME-Version: 1.0 References: <2567-1571417942.977382@E4Gc.jiiO.tvw4> In-Reply-To: <2567-1571417942.977382@E4Gc.jiiO.tvw4> From: Sebastian Gniazdowski Date: Fri, 18 Oct 2019 20:35:56 +0200 Message-ID: Subject: Re: list-colors style using the more general one To: Oliver Kiddle Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 18 Oct 2019 at 18:59, Oliver Kiddle wrote: > > Sebastian Gniazdowski wrote: > > I'm using the following zstyle: > > > > zstyle ':completion:*:zplugin:argument-rest:plugins' list-colors > > '=3D(#b)(*)/(*)=3D=3D1;35=3D1;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? No, it doesn't help > And does that affect other things like the directory completion. Not sure how to test this? I've did ls github/, and there was no chang= e > 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=3D"$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. I've committed the two changes but it didn't help. > > 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 '=3D(#b)(*)/(*)=3D=3D1;35=3D1;33' entry at the end. I'm not sure= why > this doesn't work in spite. It is like so. I've added a print to the end of _main_complete, and the output was: =E2=80=9C... more entries ... (-default-)*.o=3D2;37 (-default-)*~=3D2;37 (-default-)*.zsh_history=3D2;37 (-default-)*.zcompdump=3D2;37 (-default-)*.bash_history=3D2;37 (-default-)*.viminfo=3D2;37 (-default-)=E2= =80=9D (-default-)=3D(#b)(*)/(*)=3D=3D1;35=3D1;33 This pointed to the fact =E2=80=93 why the quotes around the first entry an= d not around the second? They're the Unicode quotes... fixing them helps =E2=80=93 I can see correct highlighting. But should the quotes be disrupti= ng the completion in such a way that a following, correct entry doesn't work? And =E2=80=93 the first entry was working OK for the things like ls . > 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. I've tried two definitions: https://github.com/trapd00r/LS_COLORS and https://github.com/zpm-zsh/dircolors-material and two had the same problem (before noticing the Unicode quotes), so that's rather not it. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org