From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15732 invoked by alias); 5 Nov 2016 03:47:45 -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: 39835 Received: (qmail 18722 invoked from network); 5 Nov 2016 03:47:45 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f43.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.213.43):SA:0(0.0/5.0):. Processed in 0.784898 secs); 05 Nov 2016 03:47:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=RPEx6gA6oppr5yln1VE86oSPz5w00eMc3QuaOozJfDk=; b=XZ0kfjsT6O/jccL1b4KSGFnVtKfzeLvsx+JW6Ql1wMdEcfTwyx63yKKmSZIbTEtPml LhIDqPQpTIkwkZmLuDG2wLo5FgFdN5AlEkPjF++Xut3Q78D2CPh0KFDHj6ZvtMx5ZuzJ GZLzXZshHB9MAMDe7wQZ9jw9kGXo5zr5ZKFHQGM/duBHTZuN+YGIzB+TTQqM07sQrU5T rOJxETsL6yb1MgwyIxFNnZZhtxuLKSht6572PdoUnUG/hWpz6djnlv9VK8OWojH7rYd3 IGd5OXhrY8j4RTwIrVoyuojbG9DFPGb/0Sm3QHOqL3v5RQI/56oJKxXIVvz4vsjc6SMF aWjg== 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:in-reply-to:comments :references:to:subject:mime-version; bh=RPEx6gA6oppr5yln1VE86oSPz5w00eMc3QuaOozJfDk=; b=es7+kytczaqrM8pRCCBJO7c77pbZWBYNzMGsDmqGb7cdEUGkKFhZB42RJwwvimKsVK WD9F6gU7I/MOFjJ7mAf2thR17/OMI4pBV771gKBcNMFr0BGb3WoJvNzXT//rNAWorCTI 1nADw8mHoRpC6xLZhouFw7HyIdXyZDeitdQrPu//jEXsiNm44NK+CqcHHg42vHPi8qpe VsK4tD/pybsSgkN3dqTr2VYCbHhl0NtcqRfsA6eCt5HwQ0p+czWgmG5VsP5YYEhsURXq +QUXvYSm/KjxmLSUMj2aRzOIZdDb/U1yg59KsnAwdrAXtsdN4j0alomdCpfsf79qwgY5 5Bvw== X-Gm-Message-State: ABUngvexlHNGmmARFBtiEfoOQbRRVUhzJawfV1KwvHUuHCOhn7PXxFuRj6XcZbNG4wN1FA== X-Received: by 10.31.209.6 with SMTP id i6mr12431750vkg.144.1478317651117; Fri, 04 Nov 2016 20:47:31 -0700 (PDT) From: Bart Schaefer Message-Id: <161104204801.ZM17816@torch.brasslantern.com> Date: Fri, 4 Nov 2016 20:48:01 -0700 In-Reply-To: <24199.1478268003@hydra.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: "fake" style requires at least one real match?" (Nov 4, 3:00pm) References: <161103173955.ZM13768@torch.brasslantern.com> <24199.1478268003@hydra.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: "fake" style requires at least one real match? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 4, 3:00pm, Oliver Kiddle wrote: } Subject: Re: "fake" style requires at least one real match? } } Bart wrote: } > This is essentially the same Q-and-A as from users/10988 almost exactly } > ten years ago. The difference is that the solution in that message no } > longer works. } > } > zstyle -e ':completion::complete:cd:*:named-directories-mine' \ } > ignored-patterns 'reply=("(${(qkj.|.)nameddirs})")' } } In my testing, the (q) flag in there is preventing ignored-patterns } from working because the | separators get quoted. That may be true, but I can reproduce with a different pattern that is neither eval'd nor (q)'d. With this: setopt cdablevars mydirs=( mydir1 mydir2 ) zstyle -e ':completion::complete:cd:*:named-directories-mine' \ fake 'reply=($mydirs)' zstyle ':completion::complete:cd:*:named-directories-mine' \ ignored-patterns '?[^y]*' zstyle ':completion::complete:cd:*' tag-order \ 'named-directories:-mine:extra\ directories' That should ignore anything that doesn't have a "y" as the second character, and show only the corresponding subset of nameddirs. % hash -d move=$PWD % hash -d home=$HOME % cd m move mydir1 mydir2 Why wasn't "move" ignored here? (I had to have at least one character of prefix to get it to offer named-directories at all.) After adding a few more styles to format the listing: torch% cd m Completing extra directories move mydir1 mydir2 So it's using the named-directories-mine context, but it's including a word that it shouldn't. This doesn't always happen. If I switch to local-directories in the above, it works as expected. So maybe there's some interaction with using the -a or -k options to compadd.