Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh completion of just latex files
- X-seq: zsh-users 7590
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: zsh completion of just latex files
- Date: Wed, 23 Jun 2004 00:01:01 -0700 (PDT)
- In-reply-to: <idugd0hm8c8qo3opan6b12o3aohi3bnc5h@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Reply-to: zsh-users@xxxxxxxxxx
- Sender: schaefer@xxxxxxxxxxxxxxxxxx
On Tue, 22 Jun 2004, zzapper wrote:
> In a directory full of latex files *.tex and all the *.toc *.dvi etc I
> want a widget to only complete *.tex file eg
>
> vtex some_tex_file.tex
>
> How should I do this?
Assuming (a) that you're using compsys rather than compctl and (b) that
there isn't already a specialized completer for "vtex", the way to do this
is with the zstyle mechanism, specifically the file-patterns style. The
example in the manual is very similar to this:
zstyle ':completion:*:*:vtex:*' file-patterns \
'*.tex:tex-files' '*.toc:toc-files *.dvi:dvi-files' '%p:all-files'
This means to first try to complete tex files, then (simultaneously, note
that the next two specs are both in the same string) toc or dvi files if
there are no tex, and finally all files.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author