zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: zsh completion of just latex files
Date: Tue, 29 Jun 2004 08:29:02 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.60.0406271006310.19831@toltec.zanshin.com> (raw)
In-Reply-To: <20040623070807.GE31781@madism.org>

On Wed, 23 Jun 2004, Pierre HABOUZIT wrote:

> [I, that is Bart, wrote:]
> > zstyle ':completion:*:*:vtex:*' file-patterns \
> > 	'*.tex:tex-files' '*.toc:toc-files *.dvi:dvi-files' '%p:all-files'
> 
> I would like to do something like that but that creates a new group
> name.

That's essentially what the above example does, except that it doesn't
supply descriptions for the groups.

In the doc for the file-patterns style, you'll find:

     The TAGs of all strings in the value will be offered by _files and
     used when looking up other styles.  Any TAGs in the same word will
     be offered at the same time and before later words.  If no `:TAG'
     is given the `files' tag will be used.

     The TAG may also be followed by an optional second colon and a
     description, which will be used for the `%d' in the value of the
     format style (if that is set) instead of the default description
     supplied by the completion function.  If the description given
     here contains itself a `%d', that is replaced with the description
     supplied by the completion function.

So something like:

 zstyle ':completion:*:*:kghostview:*' file-patterns \
     '*.(ps|pdf):pspdf-files:PostScript\ or\ PDF\ files' \
     '%p:all-files:all\ other\ files'


  reply	other threads:[~2004-06-29 15:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22 18:30 zzapper
2004-06-22 23:05 ` Sartoo
2004-06-23  7:01 ` Bart Schaefer
2004-06-23  7:08   ` Pierre HABOUZIT
2004-06-29 15:29     ` Bart Schaefer [this message]
2004-06-29 16:25       ` Pierre HABOUZIT
2004-06-23  7:59   ` zzapper
2004-06-23 15:39     ` zzapper
2004-06-23 19:08       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.60.0406271006310.19831@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).