autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] docs: mention cost of globbing during variable expansion


From: Eric Blake
Subject: Re: [PATCH 2/5] docs: mention cost of globbing during variable expansion
Date: Thu, 26 Aug 2010 10:52:48 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 08/26/2010 09:43 AM, Gary V. Vaughan wrote:
Hi Eric,

On 26 Aug 2010, at 20:45, Eric Blake wrote:
Not true, if $TMPDIR already has a value that contains globbing characters (of 
course, the likelihood of this is slim, but the whole point of ${a=b} is that 
you are assigning a value to $a _if_ it doesn't already have one, which implies 
that you are also admitting that $a may already have an unspecified value 
inherited from the user - and we know that it is never a good idea to blindly 
trust user input to be sane.

Ah-hah! The penny has dropped... now I see why the outer quotes are worthwhile. 
 Thanks for the explanation.

If you didn't do it already (I didn't go over the follow-up patches as 
carefully, so I might have missed it), I think some version of the above added 
to the Autoconf manual would make it easier for others to understand what the 
difference is, and internalise the advantages of using outer quotes when 
possible.

Yes, adding that extra timing example (for when a variable is inherited rather than defaulted) does make sense. I'll fold that in.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]