From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: [gentoo-portage-dev] [PATCH] Add the "has" function to the ebuild(5) man page.
Date: Wed, 22 Jan 2014 16:22:35 -0500 [thread overview]
Message-ID: <52E0369B.6090602@gentoo.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 142 bytes --]
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.
[-- Attachment #2: 0001-Add-the-has-function-to-the-ebuild-5-man-page.patch --]
[-- Type: text/x-patch, Size: 1212 bytes --]
From 423123cc2ea429c06914ef858a6fdb86c0c6d30b Mon Sep 17 00:00:00 2001
From: Michael Orlitzky <mjo@gentoo.org>
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<item>\fR \fI<item list>
+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<item>\fR \fI<item list>
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
next reply other threads:[~2014-01-22 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 21:22 Michael Orlitzky [this message]
2014-01-23 1:06 ` [gentoo-portage-dev] [PATCH] Add the "has" function to the ebuild(5) man page Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52E0369B.6090602@gentoo.org \
--to=mjo@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox