zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: 2 things
Date: Sun, 19 Sep 2004 13:31:49 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0409191256580.6971@toltec.zanshin.com> (raw)
In-Reply-To: <20040916134327.GA5613@blackbeard.valdosta.edu>

No one ever responded directly to this ...

On Thu, 16 Sep 2004, keef wrote:

> I would like to [use ignored-patterns to] ignore directories as well..
> I have tried '*(-/)' '(*/)' and many combinations inbetween but with no
> luck whatsoever...

As mentioned on the "Globbing question" thread, ignored-patterns are not 
filename generation patterns, they're just string comparison patterns.  
You have to exclude the directories another way; the usual way is to use 
the file-patterns style to split files into tagged groups, and then the 
tag-order style to select which groups get offered as completions.

> I have auto_param_slash and mark_dirs set... Is this ok ?

Shouldn't matter, the completion system turns those off again internally.

> in my .zshrc is have an alias -s set up to assocate all pdfs with
> xpdf ... so, ideally I would like to [complete PDF files in command
> position but] zsh looks through my path and completes binaries

Actually, and again as mentioned on the "Globbing question" thread, zsh
completes entries from the command hash table.  It also completes a lot
of other things, including suffix aliases.  I suspect that your PDF files
really are being completed, they're just buried somewhere in the mass of
commands, and what you want is for them to be preferred.

In this case the group-name and group-order styles are your friends.  
Unless you already have a generic group-name style, try:

    zstyle ':completion:*' group-name ''

Then (whatever your group-name style is) try:

    zstyle ':completion:*:*:-command-:*' group-order suffix-aliases

(Any groups not named in the style simply get tacked on at the end in 
their default ordering.)  For me, at least, the above is sufficient to
cause any files that match suffix aliases to float to the top of the
completion listing.


      reply	other threads:[~2004-09-19 20:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-16 13:43 keef
2004-09-19 20:31 ` Bart Schaefer [this message]

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.61.0409191256580.6971@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).