zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-users@sunsite.dk
Subject: Re: Globbing question
Date: Fri, 17 Sep 2004 12:31:16 +0200	[thread overview]
Message-ID: <31994.1095417076@trentino.logica.co.uk> (raw)
In-Reply-To: <200409170945.i8H9jN1H023683@news01.csr.com>

Peter wrote:

> OK, so you're saying that in most contexts, you can do something like
> 
>   zstyle ':completion:*' file-patterns '*(#q-*)'
> 
> to complete only executable files, but the specific example

That's right. (The #q isn't needed though.)

>   zstyle ':completion:*:complete:-command-::commands' file-patterns '*(#q-*)'
> 
> doesn't work because it goes through the code the wrong way?  I would

Turns out that executables are added by using `compadd -k commands' so
it isn't filename based completion at all.

> say that *is* an annoyance, and that 99% of users don't care about
> the difference between _files and _path_files.

The only difference between _path_files and _files is that _files looks
up file-patterns. _path_files should only be used if there is a good
reason to disallow file-patterns.

Styles are there for adjusting things according to user preferences not
for fixing bugs in the underlying code. So the "annoyance" is not that
file-patterns or ignored-patterns can't handle this.

> Some cross-referencing between ignored-patterns and file-patterns might
> be beneficial, too.

Yes that's true.

> Presumably a side effect of using file-patterns is the _ignored
> completer doesn't pick up the remaining files, but if I remember there
> are ways of doing this with the all-files tag.

You can call the tag what you like. The value of file-patterns is a list
much like tag-order. It just happens that the default value includes an
all-files tag with the pattern *.

Oliver


  reply	other threads:[~2004-09-17 10:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-16  3:08 lists
2004-09-16 14:30 ` Peter Stephenson
2004-09-16 15:20   ` Oliver Kiddle
2004-09-17  0:51     ` lists
2004-09-17 10:16       ` Oliver Kiddle
2004-09-17  9:45     ` Peter Stephenson
2004-09-17 10:31       ` Oliver Kiddle [this message]
2013-11-18 10:45 Dominik Vogt
2013-11-18 11:00 ` Peter Stephenson
2013-11-18 11:31   ` Dominik Vogt
2013-11-18 12:10     ` Peter Stephenson
2013-11-19  0:10   ` zzapper
2013-11-19  6:17     ` Eike von Seggern

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=31994.1095417076@trentino.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --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).