From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20462 invoked by alias); 13 Sep 2011 16:08:31 -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: X-Seq: 16341 Received: (qmail 16282 invoked from network); 13 Sep 2011 16:08: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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.12 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Yuri DElia Subject: Re: Completion lists Date: Tue, 13 Sep 2011 16:07:59 +0000 (UTC) Message-ID: References: <110913074320.ZM14249@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 93.89.57.166 (Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Iceweasel/6.0.2) Yuri DElia users.sf.net> writes: > c='${PREFIX:+=(#b)($PREFIX:t)(?)*===$color[bold]}':'=(#b)(?)*==$color[bold]' > zstyle -e ':completion:*' list-colors "reply=(\"$c\")" I think I've hit a zsh bug here :/. c='${PREFIX:+=(#b)${PREFIX:t}(?)*==1}':'=(#b)(?)*==1' zstyle -e ':completion:*' list-colors "reply=(\"$c\")" Try to complete a directory such as "./" first. The second expression will match, and the first character becomes bold. Now try: $ touch fileaa $ touch filebb $ ls file (this will correctly highlight "a" and "b") suddenly: $ ls ./ will still match the second expression '=(#b)(?)*==1' but here (?) will capture the first 4 characters, not just the first one. The length is dependent on previous PREFIX ("file" here). Bug?