From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 582 invoked from network); 24 Aug 1998 23:38:38 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (7795@203.24.36.3) by ns1.primenet.com.au with SMTP; 24 Aug 1998 23:38:38 -0000 Received: (qmail 1426 invoked from network); 24 Aug 1998 15:49:54 -0000 Received: from math.gatech.edu (list@130.207.146.50) by 203.24.36.3 with SMTP; 24 Aug 1998 15:49:54 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA23175; Mon, 24 Aug 1998 11:32:56 -0400 (EDT) Resent-Date: Mon, 24 Aug 1998 11:32:27 -0400 (EDT) To: "Zsh User's List" Subject: Controlling the order of -/g produced files and directories Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Hannu Koivisto Date: 24 Aug 1998 18:34:51 +0300 Message-ID: <87af4ubdgk.fsf@quasar.vvf.fi> X-Mailer: Gnus v5.5/Emacs 20.2 Resent-Message-ID: <"FqAOU3.0.if5.BUOur"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1750 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Greetings, I'd like to make such a completion for my utgz and vtgz shell functions that it matches to *.tgz, *.tar.gz and directories. My first attempt was as follows: compctl -g '*.(tgz|tar.gz)' + -g '*(/)' utgz vtgz This has the problem that the latter pattern is not considered if the first matches. From completion examples I found "-/g" option and decided to try it. That is, compctl -/g '*.(tgz|tar.gz)' utgz vtgz Although I didn't find explanation for this -/g option in the documentation, this version seems to work. 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. How should this be done? TIA, //Hannu