Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: open file with tex extension



Fabian Braennstroem <f.braennstroem@xxxxxx> wrote:
[...]
> A similar feature I could use in a directory with latex
> files. Once you translated a latex file you have additional
> files with the same name, but different extension.
> 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:
> 
>   `--> vim sample.aux
>   completing file
>   sample.aux    sample.idx    sample.out    sample.rel    sample.tex\~              
>   sample.dvi    sample.log    sample.pdf    sample.tex 
> 
> 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 '*~'

Regards, Frank



Messages sorted by: Reverse Date, Date, Thread, Author