zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: file-patterns problem
Date: Wed, 23 Feb 2000 18:57:16 +0000	[thread overview]
Message-ID: <E12NguT-0007Bk-00.2000-02-23-18-53-17@cmailg4.svr.pol.co.uk> (raw)

I'm sure there are going to be more ramifications of the user guide chapter
on completion (indeed, I've got a file of remarks which I'll need to
reprocess), but here's something that arose because Bart didn't like the
way I'd described file-patterns (thanks to Bart and Sven for some
corrections etc.).  The description now looks like this:

  It was explained above for the tag-order style that when a function
  uses pattern matching to generate file completions, such as all *.ps
  files or all *.gz files, the three tags globbed-files,
  all-files and directories are tried.  When you set something with
  file-patterns, all three tags are automatically activated.  So, for
  example, after

    zstyle ':completion:*:*:foo:*:*' file-patterns '*.yo'

  the command named `foo' will complete files ending in `.yo', as
  well as directories.   For once, you don't have to change the completer to
  do this:  `foo' isn't specially handled, so does default completion,
  and that means completing files, so that file-patterns is active
  anyway.

  You can now set up your tag-order style to include
  globbed-patterns, which represents the `.yo' files, and
  directories and all-files; suppose you want to make the `.yo'
  files and the directories appear at the same time:

    zstyle ':completion:*:*:foo:*:*' tag-order 'directories globbed-files'

Unfortunately this doesn't seem to work --- I don't get the directories,
even if there aren't any .yo files.  I can't see what's going wrong.  I can
add `*(-/)' to the globbed files list, of course, but then they're
naturally regarded as attached to the globbed-files tag.  Maybe I've got
the wrong end of the stick somewhere.


The other issue, with the position of the `predict' in its context, has
just been sorted out.

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


             reply	other threads:[~2000-02-23 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-23 18:57 Peter Stephenson [this message]
2000-02-24  9:04 Sven Wischnowsky
2000-02-24  9:49 ` Andrej Borsenkow
2000-02-24 10:19 Sven Wischnowsky

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=E12NguT-0007Bk-00.2000-02-23-18-53-17@cmailg4.svr.pol.co.uk \
    --to=pws@pwstephenson.fsnet.co.uk \
    --cc=zsh-workers@sunsite.auc.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).