Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh make(1) completion on FreeBSD
- X-seq: zsh-workers 39613
- From: Guilherme Salazar <gmesalazar@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: zsh make(1) completion on FreeBSD
- Date: Tue, 11 Oct 2016 21:24:16 -0300
- Cc: zsh-workers@xxxxxxx, Baptiste Daroussin <baptiste.daroussin@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0NxcVYGTuNz6cOZvUZVmEqh+relwI6yM4jmVG3W0d+w=; b=05awqNsKbgD/PayA0/vQ2N6VklbeSVYm1jjyFaJhtGFFArNRO8jiXTt6of6VE6Izf5 yfYrCbcYo8tMM5A20bUh+640TKtP6jC1bneM7tOcY1wuW742YktMnuqu7fS16y7f3GrG ETKV5qfrkbMq7CGM1/nGjtTVv/4K3A5WgVGbllslvuqkwSlKLLjcRf+YM9qjk54eezr1 YBD4NViYsEfF4F/L8zvkl5BdIRe0wj1T0apO4WAlma72Cs/RBRtaB6yZ8SMZwynJapBq nlVgnIMU7aMLDfYAA4LnxvHo/NDy+O+JoTFK5ZHfSpcwY6LB+5Lkna9uxfdZoQFF90jF LLVw==
- In-reply-to: <20161012000249.GA32367@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CA+Hmt2iOypn5PDukmM3TH1=g-194QC_6FLVeaM-U0vFG1YbO7w@mail.gmail.com> <20161011212150.GA24484@fujitsu.shahaf.local2> <CA+Hmt2h+jOFVcg1q9ujfTN0no1WJD2VyvuneRfZ+JJ1SW89cHQ@mail.gmail.com> <20161012000249.GA32367@fujitsu.shahaf.local2>
> The correct way to quote $words[1] would have been «${(q)words[1]}», but
> elements of $words are already command-line quoted so they don't need to
> be quoted again. That is: just using $words[1] directly would be correct.
> (modulo noglob, but don't worry about that)
Thank you for the explanation.
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 @@
else
case "$OSTYPE" in
freebsd*)
- _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp -f "$file" .PHONY 2> /dev/null)
+ if [[ `$words[1] -v 2> /dev/null` == *'GNU'* ]]
+ then
+ args="-nsp"
+ else
+ args="-nsdg1Fstdout"
+ TARGETS+=(${=${(f)"$(_call_program targets \"$words[1]\" -s -f "$file" -V.ALLTARGETS 2> /dev/null)"}})
+ fi
+ _make-parseMakefile $PWD < <(_call_program targets "$words[1]" $args -f "$file" .PHONY 2> /dev/null)
;;
*)
_make-parseMakefile $PWD < $file
Messages sorted by:
Reverse Date,
Date,
Thread,
Author