From: John <jmharres@gmail.com>
To: zsh-users@zsh.org
Subject: Re: problem with zstyle file-patterns
Date: Tue, 05 Nov 2013 09:09:52 -0700 [thread overview]
Message-ID: <52791850.50501@gmail.com> (raw)
In-Reply-To: <131104233118.ZM17331@torch.brasslantern.com>
Argh, yes. Not doing the compinit part was the problem. All set now.
Thanks!
John
On 11/5/13, 12:31 AM, Bart Schaefer wrote:
> On Nov 4, 8:36pm, John wrote:
> }
> } I'm having an issue with file-patterns on zstyle:
> }
> } % zstyle ':completion:*:*:yes:files' file-patterns '*XXX.*'
>
> First problem is that this zstyle pattern is wrong. The file-patterns
> style is looked up using the context ":completion::complete:yes::"
> which does not match ":completion:*:*:yes:files".
>
> Second problem is that even if the ":tag" part of the style were to
> be used, the tag "files" is not valid.
>
> The zle keybinding ctrl+x h (_complete_help) would have shown you this
> *if* you used it *before* you executed the above zstyle command:
>
> % yes <C-x h>
> tags in context :completion::complete:yes::
> all-files (_files _default)
>
> Once you run the above zstyle, you've [unintentionally] created a
> "files" tag, but that doesn't matter because the doc for file-patterns
> says:
>
> The file-patterns style provides alternatives to the default tags,
> which are not used. Its value consists of elements of the form
> `PATTERN:TAG'; each string may contain any number of such
> specifications separated by spaces.
>
> Note that it says the default tags aren't used. That's because you can
> use file-patterns to define what the tags are, so there can't yet be any
> tags at the time this zstyle is looked up. That could be clearer (it
> should probably say that *no* tags are used).
>
> Try instead
>
> zstyle ':completion:*:*:yes::' file-patterns '*XXX.*:files'
prev parent reply other threads:[~2013-11-05 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 3:36 John
2013-11-05 7:31 ` Bart Schaefer
2013-11-05 16:02 ` John
2013-11-05 16:09 ` John [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=52791850.50501@gmail.com \
--to=jmharres@gmail.com \
--cc=zsh-users@zsh.org \
/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).