From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14008 invoked by alias); 1 May 2015 15:46:02 -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: 35012 Received: (qmail 24218 invoked from network); 1 May 2015 15:46:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:to:subject:mime-version :content-type; bh=8gDsC7xTEBTrAse7xE2Bokih/YdVOm62RJR2DRzSt/c=; b=MjuW1DqbtjzXrwy3Wr5+75q9tc90R2QsPE3Z3W6cTPISr4QOMHqEUh4w9lCGshtgA1 Ms5dD3u+NZcvAsfNM1qxAZbRldBcy8T7U/oRbfUHsh+eaUiqVlUkRUwwo9vecPUgAbWg /nBy1OLeGkWlr3Yn7cBZoE03npeUblWBFzuwUj5MdmxnEpwq/nlpcGlGAr04jd63TJWg 6CYKJFMGrBRmX5Ud3uJpOEDzNcY2V17OqYJX9+wkzoO3XQ9bfSxBYr2v8R4oCPyWbQ6m hBiPW+zDnZ2C52yNUbv87VX9rPhd6zEZYFmcs6me+98BkdERL2bFv49cVHvET1XxzonE Lnlg== X-Gm-Message-State: ALoCoQmveWi+ak1e8MBxC2VWDKwEGmFG2YemlAlDvgEGQ6gA7SD3owoVdtyStwpsPx/jx0NfZBhq X-Received: by 10.202.95.198 with SMTP id t189mr7746505oib.105.1430495155524; Fri, 01 May 2015 08:45:55 -0700 (PDT) From: Bart Schaefer Message-Id: <150501084552.ZM3199@torch.brasslantern.com> Date: Fri, 1 May 2015 08:45:52 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Backrefs in zstyle patterns MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii About a year ago in users/18572, I proposed this: setopt extendedglob zstyle -e '(#b)(:completion:*)' matcher-list \ 'zstyle -a "word-$CURRENT$match" matcher-list reply' I'm fairly sure that worked then, but now it doesn't, as in, the pattern is never matched, not that $match is incorrect. However, this -- zstyle -e ':completion:(#b)(*)' matcher-list \ 'zstyle -a "word-$CURRENT:completion:$match" matcher-list reply' -- does work, so it's not just that zstyle backrefs are borked in general, and a leading (#b) in [[ xyz = (#b)(x*) ]] works as expected. Any ideas how this might have gone awry? Does it work for someone else and just not for me? Here's the similar example that actually got me looking at this: zstyle -e '(#b)(:completion:*)' show-ambiguity \ 'zstyle -T "$match" list-colors && reply=(7)' vs. zstyle -e ':completion:(#b)(*)' show-ambiguity \ 'zstyle -T ":completion:$match" list-colors && reply=(7)' The former never matches, the latter matches and sets $match to "::::" -- Barton E. Schaefer