On 04/15/2015 04:58 PM, Eric Blake wrote:
> Based on an idea by Bernhard Reutner-Fischer.
> 
> We frequently used the idiom of 'test "${var+set}" = set' to
> test if $var was set to a non-empty string, but this can portably
> be trimmed to a more compact 'test ${var+y}' for a smaller
> configure file.  Testing that a variable is not set can be done
> with '${var+false} :' (although the value of $? is not reliably
> 1 when the variable is set).

> 
> Finally finding time to revisit this; here's what I will probably
> push, if no negative review comments are raised in a couple days.

Now pushed.

> 
> I'll probably also work on a second patch that scrubs obvious
> uses of 'test -n "$var"' and 'test -z "$var"'; this patch just
> touched ${var+set} instances, plus AS_VAR_TEST_SET.

Still a possible future patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to