From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2EA13138247 for ; Wed, 22 Jan 2014 21:22:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A50FE0BBB; Wed, 22 Jan 2014 21:22:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9F890E0BB9 for ; Wed, 22 Jan 2014 21:22:38 +0000 (UTC) Received: from [192.168.1.100] (c-68-49-223-78.hsd1.md.comcast.net [68.49.223.78]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mjo) by smtp.gentoo.org (Postfix) with ESMTPSA id B6A1133FB1E for ; Wed, 22 Jan 2014 21:22:37 +0000 (UTC) Message-ID: <52E0369B.6090602@gentoo.org> Date: Wed, 22 Jan 2014 16:22:35 -0500 From: Michael Orlitzky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH] Add the "has" function to the ebuild(5) man page. Content-Type: multipart/mixed; boundary="------------020304090707010105040304" X-Archives-Salt: bd3288ce-5889-4468-b10f-809275a2b2f5 X-Archives-Hash: f9a01d3cd048e81c061ef46c1615c530 This is a multi-part message in MIME format. --------------020304090707010105040304 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I WTF'ed on this for a long time before I noticed that the docs for "has" were sort-of contained in "hasv". Might as well give "has" its own. --------------020304090707010105040304 Content-Type: text/x-patch; name="0001-Add-the-has-function-to-the-ebuild-5-man-page.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Add-the-has-function-to-the-ebuild-5-man-page.patch" >From 423123cc2ea429c06914ef858a6fdb86c0c6d30b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 22 Jan 2014 16:18:23 -0500 Subject: [PATCH] Add the "has" function to the ebuild(5) man page. --- man/ebuild.5 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man/ebuild.5 b/man/ebuild.5 index 524006a..36836b3 100644 --- a/man/ebuild.5 +++ b/man/ebuild.5 @@ -1049,6 +1049,14 @@ of \fI\-\-without\-\fR. Beginning with \fBEAPI 4\fR, an empty \fIconfigure opt\fR argument is recognized. In \fBEAPI 3\fR and earlier, an empty \fIconfigure opt\fR argument is treated as if it weren't provided. .TP +.B has\fR \fI\fR \fI +If \fIitem\fR is in \fIitem list\fR, then \fBhas\fR returns +0. Otherwise, 1 is returned. There is another version, \fBhasv\fR, that +will conditionally echo \fIitem\fR. +.br +The \fIitem list\fR is delimited by the \fIIFS\fR variable. This variable +has a default value of ' ', or a space. It is a \fBbash\fR(1) setting. +.TP .B hasv\fR \fI\fR \fI If \fIitem\fR is in \fIitem list\fR, then \fIitem\fR is echoed and \fBhasv\fR returns 0. Otherwise, nothing is echoed and 1 is returned. As indicated with -- 1.8.3.2 --------------020304090707010105040304--