From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26716 invoked by alias); 12 Aug 2015 20:05:49 -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: 36138 Received: (qmail 11918 invoked from network); 12 Aug 2015 20:05:46 -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=RtQIoGpqxRKfDBlx3+t31qtZSFAg8stDLp2wU4EUVAg=; b=BjM4RXn1m7TV5YHOKV3spF0HUjOspsnxSvHVy3YQhYn5BOHPM6+fBXJ0c/8KaNN3yT 11ACOkKgJWaOlQIpsv/sujTyPKJ9CQoGNMwncxpkpBNsC6ev3f9utO9WYZwlLONyx8pv gcySOhsTIxuj4dAlF8hudCkyxaXbrfk536BIXkkJx7Iu+mWvv4pPaTH7r+3CkFULnVlm lXl0VQoe0dgIlMZEGnqhJ5N0Gq6+RNJMhJ59jcS/Q9g8MZs77rhpC9XbMNgosJ8Qgl/9 FkdaJew27i8hVe4Yud0HLeJdN934H9RWu8C4sNPpBmDZDKo3rjWdABYIpMjZ0Gwg78Yr SR/Q== MIME-Version: 1.0 X-Received: by 10.50.30.9 with SMTP id o9mr24508984igh.36.1439409944089; Wed, 12 Aug 2015 13:05:44 -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 22:05:44 +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' ) I just went to send a new patch with this change, and noticed that the existing else case for */* does this (under list-dirs-first), elif [[ "$type" = */* ]] then pats=( '*(-/):directories ' '*:all-files ' ) should this not be other-files too? (It has been all-files since the original 2008 patch). -- Mikael Magnusson