From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9976 invoked by alias); 5 Nov 2013 07:31:29 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18093 Received: (qmail 12529 invoked from network); 5 Nov 2013 07:31:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131104233118.ZM17331@torch.brasslantern.com> Date: Mon, 04 Nov 2013 23:31:18 -0800 In-reply-to: <527867AE.7060302@gmail.com> Comments: In reply to John "problem with zstyle file-patterns" (Nov 4, 8:36pm) References: <527867AE.7060302@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: problem with zstyle file-patterns MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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 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'