From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11230 invoked from network); 23 Jun 1998 15:03:10 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jun 1998 15:03:10 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id KAA13458; Tue, 23 Jun 1998 10:57:04 -0400 (EDT) Resent-Date: Tue, 23 Jun 1998 10:53:03 -0400 (EDT) Message-ID: <358FC264.1C7A9EFA@bigfoot.com> Date: Tue, 23 Jun 1998 16:57:40 +0200 From: "Johan Sundström" Reply-To: johan_sundstrom@bigfoot.com X-Mailer: Mozilla 4.01 [en] (Win95; I) MIME-Version: 1.0 To: zsh mailinglist Subject: Compctl completion tweaking X-Priority: 3 (Normal) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Resent-Message-ID: <"PvCj22.0.YD3.E5yZr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1642 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I've been trying for some time to limit completion behaviour for some commands in an intelligent manner. What I am trying to do is mask out files not matching a given pattern, keeping directories intact, or, better still, matching files according to some pattern and directories according to some other pattern. Shouldn't that be possible using something like -g '(*.rpm(.))|(*(-/))'? I tried for a while with some print -m magic, but didn't quite manage to get it to work. (Sure, -g '*.rmp(.)' + -g '*(-/)' does a fair job, but I find it irritating that I cant tab my way down into a subdirectory of a directory containing *.rpm files this way.) Secondly, is there any way I can influence the sorting compctl does? I'd be very happy if some commands' completion list would be sorted files-first, others' directories-first, and yet others mixed-alpha-sort (the only method I am aware of being possible). I thought this behaviour could be mimiced crudely using -K functions, but it seems the function's output is being sorted. It sure took me a while realizing that... :\ /Johan Sundström