Zsh Mailing List Archive
Messages sorted by:
Re: problem with zstyle file-patterns
- X-seq: zsh-users 18096
- From: John <jmharres@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: problem with zstyle file-patterns
- Date: Tue, 05 Nov 2013 09:09:52 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=F/Qw17IyRnlXioFJofdP32poTpu/QczDmedFGgtBAOk=; b=MEGAHRLUBPFCgeNcQv1lpqHzEr2Zvnu/3fLPnewPXTrISKMcXJt9QUqipTI3SEyLr6 5RqQFo3BTIP1r63IvJ7nD8ubN9MkfpQuU2BdMYsF4Zkw7p3HI0hYyJI1kbdmbqBHDCA+ Nj2s4JI1D1k3P0TE2vxXr7UpQCdeTNrhyjIySb0TXPMLJIxu3Z0fv/70/hkdWhR2Vqy6 mZA/UBeVFr3SheEF1xQHLMSm7A5yiDxCjpiLzQOpBM8UrJEJsDl0iQZcdezQu56auvjU kvwMBZBcwnV8UKPXDLPVITDTwDqhATIVb0ZnoVDYNTSV+NDhQrVBqW4GtWNKZ9WI6Aee BBhA==
- In-reply-to: <131104233118.ZM17331@torch.brasslantern.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <527867AE.firstname.lastname@example.org> <131104233118.ZM17331@torch.brasslantern.com>
Argh, yes. Not doing the compinit part was the problem. All set now.
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
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).
zstyle ':completion:*:*:yes::' file-patterns '*XXX.*:files'
Messages sorted by: