From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29419 invoked by alias); 12 Aug 2015 19:35:09 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36136 Received: (qmail 7071 invoked from network); 12 Aug 2015 19:35:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bdFgJwvv3hfUZ7M/zJobng7WnfZTATuPzI8JFDGocLs=; b=Gxy2wDNNyIr99L/8f+5yBllT/qlnUnF/dKbqa7XSvzLDAq5AgTa7cJrEkfDUQhrV/Q 0xs4E4dh7UtiCYVwB8Lepet5EoLejBLOkQO8g1XipGA1ZAic9BpRW9LlXL31QNNRYYvD xk4AEC3o40o4cVF7uhT7jYABTlXWImmkeSK/A00P/8OYBKvIsQMgPiK3myq/NeW4W7m6 82UlhxDpW4/dxkS/IyPPXedEIu6UystT+XqObFjxca8g5zYKxAywhbX4vzv+8dskaSIP x5J118O+NYthTMDItbDG4dnJeBABkcMi4vEv14Us4+X2RHItX1YrD2eFy872oXdyxaBv G3yw== MIME-Version: 1.0 X-Received: by 10.50.30.9 with SMTP id o9mr24392647igh.36.1439408100842; Wed, 12 Aug 2015 12:35:00 -0700 (PDT) In-Reply-To: <150812115958.ZM14070@torch.brasslantern.com> References: <1439348703-8268-1-git-send-email-mikachu@gmail.com> <1439348703-8268-3-git-send-email-mikachu@gmail.com> <7518.1439400015@thecus.kiddle.eu> <150812115958.ZM14070@torch.brasslantern.com> Date: Wed, 12 Aug 2015 21:35:00 +0200 Message-ID: Subject: Re: PATCH 3/5: _imagemagick: complete all files if image files didn't match From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Wed, Aug 12, 2015 at 8:59 PM, Bart Schaefer wrote: > On Aug 12, 8:12pm, Mikael Magnusson wrote: > } Subject: Re: PATCH 3/5: _imagemagick: complete all files if image files di > } > } > You might want to instead check your file-patterns styles to see what > } > you've configured that broke this. > } > } You're right that it works in zsh -f, however, I don't have any > } file-patterns styles set and it still doesn't work in my setup. > } > } This is the line that breaks the desired behaviour, > } zstyle ':completion:*' list-dirs-first true > } > } Which I find to be somewhat unexpected. > > I'd swear a similar conversation went by on the list sometime in the > past, but I can't find it now. > > } This seems to fix it, and brings the l-d-f case in line with the > } default case below it. > > I don't know that I feel strongly about this one way or another, but > according to http://www.zsh.org/mla/workers/2008/msg01119.html you are > not supposed to get an all-files tag when using list-dirs-first. > Instead you're always supposed to get "directories" and "other-files". > > So instead of > > pats=( " *(-/):directories:directories ${glob//:/\\:}:globbed-files" '*:all-files' ) > > (which BTW had a stray line break in the patch you sent) it should be > at most > > pats=( " *(-/):directories:directories ${glob//:/\\:}:globbed-files" '*(-^/):other-files' ) Okay, it was a very tentative patch so I just pasted it in the gmail web interface, it usually breaks them. The line you suggested seems to work fine for me as well. However, the duplicates from the * seem to get filtered out by somewhere already because my listing is identical except from the different tag for the files. I suppose if I removed the directories tag, they would show up under the all-files tag instead though, so this is indeed more correct. Is the leading space in that pattern significant in any way, by the way? -- Mikael Magnusson