From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26937 invoked by alias); 12 Sep 2016 15:18:03 -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: 39293 Received: (qmail 23706 invoked from network); 12 Sep 2016 15:18:03 -0000 X-Qmail-Scanner-Diagnostics: from mail-pa0-f41.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.220.41):SA:0(0.0/5.0):. Processed in 0.134612 secs); 12 Sep 2016 15:18:03 -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=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: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) 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=tsDC1xVdcrkrGU377RJA76SrOt03kPCpNZjj3UIUj1U=; b=c35nTGNVnIWo08+EBVTnSfwLlDy4JBr+9maxGmKMXZlCmC9tgOZDvPgaM1U1zIc5x6 flfxSB1UGzd87V1oCZ3Kz7bldK/pCyyK82EQgbBPjngVOTREPD5UCXoNqZruiHW+DoX7 3rG8s3vYpOh8FrqV29WczS0MmmXUTUlRJgVJAjgGaUzGvKBg/dZjumQciBSUF+XJGzgg e2gW56NJWTkaQSCUTSirhtxPuqgj7Ojen8AaEQJRIOoYS1VKKXPMiYzRvmBFobcDf6Jd BzKXfIL3o35bTFBM0OucfD3lYLRmKc2byVvQumxG47KfR5Mr+eVT1CTE1YWja8FOE7rx ESNQ== 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=tsDC1xVdcrkrGU377RJA76SrOt03kPCpNZjj3UIUj1U=; b=YL9BaMn1jyrWDfgbn2+jlFBTmB1GgJSBKN7lYR3gIdwv8t/l562pt/WzwdwtRSJ74+ jOoCFDiBZfDsadRnaCnTbRPH9P0KH4svCQj9tFFJymPdjbQ8r83sAyXF7TaeBs5rnKzM dgcw/nHJLKE9yRAhugIvXJJmezhSIgi6ht9wSvR6xDP9TKjbVmHgipZe1FXcZF8AxFw9 MwsgPK33VzVdRXuAl6cDj93KuQT95gL/xNEN+4PEs6QFRvygIBM6Jeyo8JBAorUdKPrx 1AZwJVp8GuIovLn1KRvFc8oIITS12XfNlql5Zj26vub7Ox3Jl9zoYVpFPslkevdhIhA+ K0ug== X-Gm-Message-State: AE9vXwM7IvMDoK1VqB3pmE6btrJaDmAmheBakMoNIqTMkujMGxGjlnErYikCGd5T1YzieQ== X-Received: by 10.66.132.38 with SMTP id or6mr33773417pab.84.1473693474441; Mon, 12 Sep 2016 08:17:54 -0700 (PDT) From: Bart Schaefer Message-Id: <160912081802.ZM24135@torch.brasslantern.com> Date: Mon, 12 Sep 2016 08:18:01 -0700 In-Reply-To: Comments: In reply to Marko Myllynen "Re: Pattern matching with _files vs command line" (Sep 12, 7:30am) References: <75f69404-5bc4-20e5-caf7-3d0a6dd87b59@redhat.com> <160909194033.ZM19936@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Pattern matching with _files vs command line MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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. I don't really understand why this is the case; it seems to have something to do with whether the string passed to "compadd" really does match a file name (which it won't when the "/" is appended).