From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13138 invoked from network); 23 Sep 2006 23:49:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Sep 2006 23:49:41 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 70034 invoked from network); 23 Sep 2006 23:49:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Sep 2006 23:49:34 -0000 Received: (qmail 12824 invoked by alias); 23 Sep 2006 23:49:27 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10757 Received: (qmail 28485 invoked from network); 23 Sep 2006 21:02:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Sep 2006 21:02:44 -0000 Received: (qmail 26003 invoked from network); 23 Sep 2006 21:02:44 -0000 Received: from ug-out-1314.google.com (66.249.92.173) by a.mx.sunsite.dk with SMTP; 23 Sep 2006 21:02:43 -0000 Received: by ug-out-1314.google.com with SMTP id o2so351838uge for ; Sat, 23 Sep 2006 14:02:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; b=QtSGPG1EVUqb1dkmMoIMlfh+4CPo7mOcD7M8uE8j/Rsgp9+/it7Kb/xPSULO7jZUEbihzsiV3BEPXMHMpTeGmnLTQjZvSk+H/WyzWH5sJoFeu4dhVGHNIE+CNv0tmFbIbFBwl2oFOpXklTCSjbYLB4C/E1qWgKWqugL3g0hixow= Received: by 10.67.97.7 with SMTP id z7mr1904252ugl; Sat, 23 Sep 2006 14:02:40 -0700 (PDT) Received: from gmail.com ( [62.31.233.233]) by mx.gmail.com with ESMTP id l40sm471245ugc.2006.09.23.14.02.39; Sat, 23 Sep 2006 14:02:40 -0700 (PDT) Received: by gmail.com (nbSMTP-1.00) for uid 501 (using TLSv1/SSLv3 with cipher DES-CBC3-SHA (168/168 bits)) weirdofreak@gmail.com; Sat, 23 Sep 2006 22:02:41 +0100 (BST) Date: Sat, 23 Sep 2006 22:02:40 +0100 To: zsh-users@sunsite.dk Subject: imagemagick completes for all files Message-ID: <20060923210240.GA13304@phil.en.oaci.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.8i From: Philip Hi, My imagemagick completion lists all files, not just images. I looked at .../functions/Completion/Unix/_imagemagick, and these seem to be the relevant lines: > formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xwd:xbm:xpm:yuv > > if (( $# )); then > _files "$@" "$expl[@]" -g '*.(#i)(${~format//:/|})(-.)' > return > fi and in _arguments: > '*:picture file:_imagemagick' I assumed the _files call was causing the problem, since 'format' doesn't exist as a variable. But changing it to 'formats' didn't help, and nor did taking it out of the quotes or removing the tilde. I'm not sure what the (-.) means, but removing that doesn't help either, and it doesn't seem to change the results I get from a manual glob. The line as I currently have it is: > _files "$@" "$expl[@]" -g '*.(#i)('${formats//:/|}')' I've also confirmed that changing the file does have an effect when I start a new shell, and that the _arguments line I quoted is the one that's controlling the completion. So right now I'm somewhat stumped; any help would be appreciated. I'm using v4.2.5, from gentoo's repositories.