Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Mike Frysinger <vapier@g.o>
Subject: Re: new `usex` helper
Date: Wed, 14 Sep 2011 10:53:12 -0400
On Wed, Sep 14, 2011 at 02:02, Ulrich Mueller wrote:
> On Tue, 13 Sep 2011, Mike Frysinger wrote:
>> usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
>
> You should omit the colons though. ${2-yes} and ${3-no} will allow for
> an explicit empty string as argument, whereas the :- variants won't.

in my original use, i wanted the :- behavior.  but i can see how the -
behavior would be generally more flexible.
-mike


References:
new `usex` helper
-- Mike Frysinger
Re: new `usex` helper
-- Mike Frysinger
Re: new `usex` helper
-- Brian Harring
Re: new `usex` helper
-- Mike Frysinger
Re: new `usex` helper
-- Ulrich Mueller
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: new `usex` helper
Next by thread:
Re: new `usex` helper
Previous by date:
Re: [RFC] obs eclasses
Next by date:
Re: new `usex` helper


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.