Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Color in completions
- X-seq: zsh-users 21213
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Color in completions
- Date: Sun, 31 Jan 2016 16:38:21 +0100
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=j/8Z4lep5WHEcTOWpZuMuvGrSKZP5hGWaRP9HNh1NVQ=; b=qJEKLO74xcYfDAmxBw0yaSxbdIWHN+fEHL24MAEptWkhRkWl4muAAC1TS9oUb80BD/ 7BfA12chxiRxKFAfwcxocSLOGhDpA6Jltw+o+ctrkVQ8To/ofJ7jeJbpsINXxqtw0/M1 La2RSmNn5lSj1d3mIAgucC4giX4HZryePNkTkYCWGVDx+qQCZxInu7KD0CK5p2K6MyfR jQ7/H2N2smuYQD8PeF9yXoE+dWXuZTKv2w1fqa7kZJ0qbI3OCkxo4LeQqKu4uGCHpA1r u7nNUb2jsKQFR1hHrjzhT3YShqm7X0aDMLTbamWO3JOepgSAzC+1qljvBdh9EgUrlDiP /xSQ==
- In-reply-to: <160129144546.ZM24675@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDSZJ2ZijK1siwRA-8AV0H4ROeEyS26i5DWeFJT6SO24w@mail.gmail.com> <160129144546.ZM24675@torch.brasslantern.com>
On 29 January 2016 at 23:45, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> You can get color in completion listings with the complist module,
> see "man zshmodules" or "info zsh 'The zsh/complist Module'". In
> particular this reference to $ZLS_COLORS:
>
> The leading-equals form also allows different parts of the displayed
> strings to be colored differently. For this, the pattern has to use the
> `(#b)' globbing flag and pairs of parentheses surrounding the parts of
> the strings that are to be colored differently. ...
Managed to do this. Had to:
1. Figure out to use _wanted instead of only compadd
2. Figure out what pattern to give to zstyle:
zstyle ':completion:*:zplugin:*:argument-rest' list-colors
'=(#b)(*)/(*)==1;35=1;33'
When I display $curcontext within _zplugin (after adding -C to
_arguments), it shows: :complete:zplugin:argument-rest. I wonder why
do I need the additional ":*:" before "argument-rest" ? Or even the
first one.
https://github.com/psprint/zplugin/blob/master/_zplugin
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author