From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13446 invoked by alias); 5 Nov 2013 16:02:58 -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: 18095 Received: (qmail 8930 invoked from network); 5 Nov 2013 16:02:52 -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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 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=YALMrvlgloYVR+xeRLsRHBsWYTdVdzBIpxAkecvoxII=; b=kJOIYLZDlldEvw1AyVNZIg0wGvOhBWhAXQC9bJMEsQ5+Hlzgto/G0Eqc72lD4L8xRb F8GaNOfaH0bql9CE9a9fKJzedeg+o47Li1zVrtxEkreOxwLfBM4XCkeQgBP/y5KyxGUP Phh5i9Wj6uOX+w1Hv0I5IbtTzCUysVvjcrQ3Elcr5yCUXLoFos9XlBBonbZmLSoSdHvX zE3A64nVx0/CxihR5+GlnghpiXWh8KVqMKQ+ws1Cpy1MugcsGEoFHJifRex/IEataKTd e6nMFwtaY5J9Y2wDc+xpW3SO9KAUygW7+5533eMob9nWEW1JLPh9n64/nFqFZjrBXVtR 5MTQ== X-Received: by 10.68.180.131 with SMTP id do3mr23783886pbc.34.1383667366444; Tue, 05 Nov 2013 08:02:46 -0800 (PST) Message-ID: <527916A4.6060705@gmail.com> Date: Tue, 05 Nov 2013 09:02:44 -0700 From: John User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: problem with zstyle file-patterns References: <527867AE.7060302@gmail.com> <131104233118.ZM17331@torch.brasslantern.com> In-Reply-To: <131104233118.ZM17331@torch.brasslantern.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I still must be doing something wrong: % zstyle ':completion:*:*:yes::' file-patterns '*XXX.*:files' % yes DIR1/ DIR2/ DIR3/ XXX-YYY.4 XXX.3 I've been using zsh for a rather long time, and it's possible I've got old, now-irrelevant settings. I only found out about the new completion system in the past week, and am not sure what to change for that. 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 > 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'