Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: open file with tex extension
- X-seq: zsh-users 9924
- From: Jean Chalard <jean.chalard@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: open file with tex extension
- Date: Tue, 14 Feb 2006 22:29:50 +0900
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ADrUXKF/ojcuLyNmvpLWF5XN3bVMZTFn24MoXKB2U3H3bnynY2NCLcU0dSrKIAlwje4ir8cnMs0HV2k+W/yUnMH1f71GKPNEZ4wK38CYeCq69McMaA1qDXiZQEvA+r/H7LkoJlSm1u4EA3kfpnLicnvIQwoolk+g5UwZi23yhD0=
- In-reply-to: <20060214123035.GC5744@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <slrndv11s2.6nu.f.braennstroem@xxxxxxxxxxxxxxxxxxxxx> <20060214123035.GC5744@xxxxxxxxxxxxxxx>
> > Now, I look for a way to adjust the completion so that when
> > I type the name of the latex file zsh completes the
> > extension to '.tex' and does not give any other options
> > like:
> > [example]
> > Is that somehow possible?
>
> you can ignore certain patterns for completion:
>
> zstyle ':completion::*:(vi|vim):*' ignored-patterns \
> '*?.(aux|dvi|log|idx|pdf|rel|out)'
> zstyle ':completion::*:(vi|vim):*' ignored-patterns '*~'
A possibly better solution would be to complete on the tex file
first, but would still complete on the other files if there is no
other completion :
zstyle ':completion::*:(vi|vim):*' file-patterns '*.tex' '*'
...that way, if there is a tex file and you hit tab, zsh will complete
on the tex file even if there are other acceptable completions.
It's also possible, and probably even better, to complete first on
whatever is not one of the outputs of latex, while retaining the
completion on them failing that.
zstyle ':completion::*:(vi|vim):*' file-patterns
'*~*.(aux|dvi|log|idx|pdf|rel|out)' '*'
--
J
"Toi, je te trouve pas la même tête que sur la page précédente" -- Wakamiya
Messages sorted by:
Reverse Date,
Date,
Thread,
Author