Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion for gtar
- X-seq: zsh-workers 4355
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Completion for gtar
- Date: Wed, 26 Aug 1998 10:18:11 +0200 (MET DST)
- In-reply-to: Bruce Stephens's message of 25 Aug 1998 16:29:59 +0100
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author