From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2550 invoked from network); 26 Aug 1998 08:22:27 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 26 Aug 1998 08:22:27 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id EAA00926; Wed, 26 Aug 1998 04:16:01 -0400 (EDT) Resent-Date: Wed, 26 Aug 1998 04:16:01 -0400 (EDT) Date: Wed, 26 Aug 1998 10:18:11 +0200 (MET DST) Message-Id: <199808260818.KAA00478@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu In-reply-to: Bruce Stephens's message of 25 Aug 1998 16:29:59 +0100 Subject: Re: Completion for gtar Resent-Message-ID: <"ypL_L.0.PE.1Hyur"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4355 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bruce Stephens wrote: > ... > > The function just lists the files in the archive (which is, > confusingly, the third in the args array, but the second argument in > the compctl pattern). Similarly, the check to see whether the archive > is compressed or not has to check $args[2], whereas it's 'p[1]' in the > compctl. And how can I arrange a fallback: suppose the archive > doesn't exist---how can I get the equivalent of -f or something in > this case? Do I write > > reply=($1*$2*) > > or something? (Setting NULL_GLOB as a local option in the function.) > Or you return an empty reply array and use xor'ed completion: - 'p[3,-1] W[1,*x*] W[2,^-]' -K gtar_files + -f -- gtar ^^^^^^ Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de