From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10989 invoked by alias); 12 Sep 2016 15:40:52 -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: 39296 Received: (qmail 11554 invoked from network); 12 Sep 2016 15:40:52 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f53.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(74.125.82.53):SA:0(-0.0/5.0):. Processed in 0.282226 secs); 12 Sep 2016 15:40:52 -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 autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: myllynen@redhat.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 74.125.82.53 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:reply-to:subject:references:to:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=5J3xWz8mHpqOJ6KpQqOsCBcgqrG61No1tRA5ph1AA9A=; b=hI1wY6M0MVbwRId7Kj9FHdmqxrHdZkW0GA8Josvd48tWYO60aW7/R7N2p0gjqTlwnY BdiLcVIjsXpND6nM4KoadNnoZbaDeEZ+C5iaP/0dr1m7MD8hOYSgYIVM/zDPaGSVkzGF 5qOHjBb+xkuU+tyleUVKFOjTPDroSqa9WsM0knnaGsxgviuEf76VtC16H01X/NXgpSYy LYmo11YR4mZl+xrm2jsmSJG0h+2lczlRxVWzXNN/N1faHtjCCHBwd/7PqvQeAuLaQg9J N8Djf+g0cILJUfikqEFBdHho3nDXw0/ruUAtVSvD+oOYepSuwSmNvsQDgWdke9wJsvJX 9iAA== X-Gm-Message-State: AE9vXwNF78BSVdP8VATvQ2oPa8BzOdWDDOy1bAGCEnEdHKdFZLpI71jZ35EJ9x3u9GGfieI7 X-Received: by 10.28.109.144 with SMTP id b16mr3608337wmi.19.1473694492346; Mon, 12 Sep 2016 08:34:52 -0700 (PDT) Reply-To: Marko Myllynen Subject: Re: Pattern matching with _files vs command line References: <75f69404-5bc4-20e5-caf7-3d0a6dd87b59@redhat.com> <160909194033.ZM19936@torch.brasslantern.com> <160912081802.ZM24135@torch.brasslantern.com> To: zsh-workers@zsh.org From: Marko Myllynen Organization: Red Hat Message-ID: Date: Mon, 12 Sep 2016 18:34:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <160912081802.ZM24135@torch.brasslantern.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, On 2016-09-12 18:18, Bart Schaefer wrote: > On Sep 12, 7:30am, Marko Myllynen wrote: > } > } On 2016-09-10 05:40, Bart Schaefer wrote: > } > On Sep 9, 8:39am, Marko Myllynen wrote: > } > } > } > } _wanted files expl file _files -g '*(-FM)' && ret=0 > } > > } > # People prefer to have directories shown on first try as default. > } > # Even if the calling function didn't use -/. > } > > } > zstyle :completion::complete:foo:: file-patterns '%p:globbed-files' > } > } Thanks, this did the trick! > } > } > zstyle :completion::complete:foo:: tag-order globbed-files - > } > } This, however, doesn't seem to work: with or without the former this > } stops completion for foo altogether. > > Yes, that's connected to this: > > } > HOWEVER, you've actually broken things with your glob pattern. Adding > } > the (M) flag means that the generated completions end with a "/" > > If you fix the glob pattern to remove the (M) qualifier, then tag-order > works (at least for me). If you leave the (M) in there, tag-order is > broken. Sorry, should have mentioned that I tested already without (M). Both with 5.0.2 and latest git master (otherwise I had default zstyle settings). Since the earlier stanza already solved the issue, not sure is this worth pursuing further. Thanks, -- Marko Myllynen