From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4838 invoked by alias); 24 Apr 2010 17:43:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27899 Received: (qmail 3682 invoked from network); 24 Apr 2010 17:43:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) MIME-Version: 1.0 In-Reply-To: <20100423222858.GC11609@plenz.com> References: <20100423222858.GC11609@plenz.com> Date: Sat, 24 Apr 2010 10:35:06 -0700 Message-ID: Subject: Re: Bug: _oldlist and automatic coloring of matched From: Bart Schaefer To: zsh-workers@zsh.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Apr 23, 2010 at 3:28 PM, Julius Plenz wrote: > > =A0 =A0autoload -U compinit && compinit > =A0 =A0zmodload -i zsh/complist > =A0 =A0zstyle ':completion:*' completer _oldlist _complete > =A0 =A0zstyle ':completion:*' menu select select=3Dlong-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]" =3D keep ]]; then ZLS_COLORS=3D"$_saved_colors" elif (( $#_comp_colors )); then ZLS_COLORS=3D"${(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.