Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: _oldlist and automatic coloring of matched
- X-seq: zsh-workers 27899
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug: _oldlist and automatic coloring of matched
- Date: Sat, 24 Apr 2010 10:35:06 -0700
- In-reply-to: <20100423222858.GC11609@xxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20100423222858.GC11609@xxxxxxxxx>
On Fri, Apr 23, 2010 at 3:28 PM, Julius Plenz <julius@xxxxxxxxx> wrote:
>
> autoload -U compinit && compinit
> zmodload -i zsh/complist
> zstyle ':completion:*' completer _oldlist _complete
> zstyle ':completion:*' menu select select=long-list
>
> If you hit Tab the first time, the listing of filenames is not
> colored. But once you hit Tab again (and the _oldlist completer comes
> into play) suddenly some matches are colored.
This is actually coming from _main_complete, here:
if [[ "$compstate[old_list]" = keep ]]; then
ZLS_COLORS="$_saved_colors"
elif (( $#_comp_colors )); then
ZLS_COLORS="${(j.:.)_comp_colors}"
else
unset ZLS_COLORS
fi
I guess there should be a second test that $_saved_colors is non-empty
before assigning it to ZLS_COLORS ... but I'm not sure that's correct
either, because we don't know at this point *why* $_saved_colors is
empty, i.e., whether the value when saved was empty or unset.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author