From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14395 invoked by alias); 12 Oct 2016 00:36:11 -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: 39614 Received: (qmail 21242 invoked from network); 12 Oct 2016 00:36:11 -0000 X-Qmail-Scanner-Diagnostics: from out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.29):SA:0(0.0/5.0):. Processed in 0.14248 secs); 12 Oct 2016 00:36:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=nZlPRz2SAlkH6dX0oR4O6kh+lhM=; b=e4VGBt sPsOXGOuPkiOPiWL9zUZvOhtZnTDylfh2qi5GkJV8+kNL+0VmiCDke+EEGYtPGuS TOiG3gESyfuBDnrWTzbd0syoPvT/TRd1L60pS5KuaAA59PhFvAL4kWPGI1Og+KRY GrAeRzCHJcpwrzRcBhifoiJjDNPPGk49d5Tx8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=nZlPRz2SAlkH6dX0oR4O6kh+lhM=; b=Qpl5N C/uEO1UlZ1WvjZ762gHat4u/XyrKQcHhQfcTtl0X6Ey7IXOHKlm9L930kY3u6nHO Fwoh+y6XmQRJQMn+ptuNPjzjARvo00edUGauoCGSI2Ac/rKCJ7a5K90XP8UROGDS bfdD51+F0LYeU2LIUdsiySQi4v7S1Ed2dSLD5M= X-Sasl-enc: V9PIawxgPZn/UPGno1bVqPzTtYj9SrcBikTYRvBjOLpo 1476232568 Date: Wed, 12 Oct 2016 00:36:06 +0000 From: Daniel Shahaf To: Guilherme Salazar Cc: zsh-workers@zsh.org, Baptiste Daroussin Subject: Re: zsh make(1) completion on FreeBSD Message-ID: <20161012003606.GB32367@fujitsu.shahaf.local2> References: <20161011212150.GA24484@fujitsu.shahaf.local2> <20161012000249.GA32367@fujitsu.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Guilherme Salazar wrote on Tue, Oct 11, 2016 at 21:24:16 -0300: > If one's make points to gmake instead of bmake, $words[1] itself will > not be gmake. New patch attached fixes that, by looking for GNU in > `$words[1] -v`. Sorry about that, didn't think about it before ;p > --- /usr/ports/shells/zsh/work/zsh-5.2/Completion/Unix/Command/_make 2015-08-08 14:51:33.000000000 -0300 > +++ /usr/local/share/zsh/5.2/functions/Completion/Unix/_make 2016-10-11 21:15:56.295311000 -0300 > @@ -268,7 +268,14 @@ > + if [[ `$words[1] -v 2> /dev/null` == *'GNU'* ]] That's precisely what the _pick_variant call at the top of the function does, so you can just test $is_gnu instead. Note that the enclosing if already inspects that variable. In current master (before your patch), the 'call-command' style is consulted only for GNU make but not for FreeBSD. Do you know if that's intentional, perhaps (going by the style's docs) because the GNU make invocation has side-effects while the BSD make invocation has none?