* Re: Completion for gtar
@ 1998-08-26 8:18 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1998-08-26 8:18 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-08-26 8:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-26 8:18 Completion for gtar Sven Wischnowsky
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).