From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1657 invoked from network); 25 Aug 1998 00:23:24 -0000 Received: from postoffice.telstra.net (139.130.4.7) by ns1.primenet.com.au with SMTP; 25 Aug 1998 00:23:24 -0000 Received: from math.gatech.edu (list@math.gatech.edu [130.207.146.50]) by postoffice.telstra.net (8.8.8/8.8.8) with ESMTP id BAA10542 for ; Tue, 25 Aug 1998 01:39:34 +1000 (EST) (envelope-from zsh-workers-request@math.gatech.edu) Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA25588; Mon, 24 Aug 1998 13:12:46 -0400 (EDT) Resent-Date: Mon, 24 Aug 1998 13:12:25 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980824101416.ZM10055@candle.brasslantern.com> Date: Mon, 24 Aug 1998 10:14:16 -0700 In-Reply-To: <87af4ubdgk.fsf@quasar.vvf.fi> Comments: In reply to Hannu Koivisto "Controlling the order of -/g produced files and directories" (Aug 24, 6:34pm) References: <87af4ubdgk.fsf@quasar.vvf.fi> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Hannu Koivisto , "Zsh User's List" Subject: Re: Controlling the order of -/g produced files and directories MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"FfSjY1.0.AF6.vxPur"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1751 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 24, 6:34pm, Hannu Koivisto wrote: } Subject: Controlling the order of -/g produced files and directories } } I'd like to make such a completion for my utgz and vtgz shell } functions that it matches to *.tgz, *.tar.gz and directories. } } compctl -/g '*.(tgz|tar.gz)' utgz vtgz } } Although I didn't find explanation for this -/g option That's not one option, it's two: -/ -g '*.(tgz|tar.gz)' It happens that you can run them together as -/g because -/ doesn't take any additional arguments. -/ means "complete filesystem paths." } However, I would prefer that if some directory has both matching } files and subdirectories then those files would be first in the } list of completions and those directories last. Zsh currently sorts the completion list itself, alphabetically; there has been discussion of changing this on the developer's list, but at the moment you can't force files to sort ahead of directories. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com