From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23236 invoked from network); 15 Dec 2003 21:41:33 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Dec 2003 21:41:33 -0000 Received: (qmail 25772 invoked by alias); 15 Dec 2003 21:41:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19294 Received: (qmail 25718 invoked from network); 15 Dec 2003 21:41:27 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Dec 2003 21:41:27 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.11.8.53] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Dec 2003 21:41:26 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id hBFLfHY13702 for zsh-workers@sunsite.dk; Mon, 15 Dec 2003 13:41:17 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1031215214116.ZM13701@candle.brasslantern.com> Date: Mon, 15 Dec 2003 21:41:16 +0000 In-Reply-To: <6396.1071518828@gmcs3.local> Comments: In reply to Oliver Kiddle "Re: Completion in pwd before subdirecories" (Dec 15, 9:07pm) References: <20031213154651.GR18859@strindberg.dsv.su.se> <1031213191918.ZM5325@candle.brasslantern.com> <20031213233905.GW18859@strindberg.dsv.su.se> <3213.1071488991@gmcs3.local> <1031215170258.ZM12804@candle.brasslantern.com> <5719.1071514564@gmcs3.local> <1031215193717.ZM13527@candle.brasslantern.com> <6396.1071518828@gmcs3.local> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh workers Subject: Re: Completion in pwd before subdirecories MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 15, 9:07pm, Oliver Kiddle wrote: } } Bart wrote: } > } > So why aren't we using "_files -g '*.gz(.)'" in that case? } } That's actually a much better plan. I suppose really it should be "_files -g '*.gz(-.)'" ... } We still need to ask whether the user should need a file-patterns style } to achieve directories after files for the original menu completion } question. I presume this only applies in the case of also using the group-name and group-order styles, because otherwise you don't get them separated in the first place. } Is globbed-files somewhere defaulting to `*'. Should it } perhaps default to `*(.)'? I've not looked at _files but try ^Xh after } something like `cat' or `:' with and without a file-patterns style. It depends. By default without a file-patterns style the only group is `*:all-files'. So you have to have the file-patterns style to get any differentiation at all. tags in context :completion::complete:cat:: all-files (_files _default) For commands that use "_files -g ..." the pattern passed in with -g is used for globbed-files. tags in context :completion::complete:gcc:: argument-rest options (_arguments _gcc) tags in context :completion::complete:gcc:argument-rest: globbed-files (_files _arguments _gcc) directories (_files _arguments _gcc) all-files (_files _arguments _gcc) E.g. for "-g foo" it would be "foo:globbed-files *(-/):directories" "*:all-files" Note that directories and globbed-files are completed together, which normally means the extra directory would be suppressed as a duplicate. It's only when wanting to split globbed-files and directories that you see some directories twice, and that would be suppressed by using the appropriate flags on the argument of -g.