From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22691 invoked by alias); 20 Dec 2014 05:37:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19622 Received: (qmail 17822 invoked from network); 20 Dec 2014 05:37:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=windows-1252; format=flowed X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=nXUbkqBeGw4q4gDV/Ctilg==:117 a=nXUbkqBeGw4q4gDV/Ctilg==:17 a=G8GL833Es-AA:10 a=N659UExz7-8A:10 a=EppB0tUxG8AtSjsZH_MA:9 a=pILNOxqGKmIA:10 Message-id: <54950B02.3010907@eastlink.ca> Date: Fri, 19 Dec 2014 21:37:06 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 To: =?windows-1252?Q?Lawrence_Vel=E1zquez?= Cc: zsh-users@zsh.org Subject: Re: surprise with echo References: <54937E5B.2020008@eastlink.ca> <141218190653.ZM16331@torch.brasslantern.com> <20335.1418988086@thecus.kiddle.eu> <5494F332.7000008@eastlink.ca> In-reply-to: On 12/19/2014 09:08 PM, Lawrence Velázquez wrote: > You still don't understand what's going on. The expansion only results > in a null result *if the array itself is empty*. Null *elements* do > not produce the same behavior. Yes, I understand it, I just spoke poorly. > Agreed. That's why enabling RC_EXPAND_PARAM by default should never > happen. I'd say that if it worked the way Kurtis showed that it's 'supposed' to work then that would be the best of all possible worlds. But it's just my 1/2 cent, I don't value my own opinion on this beyond that. >> OTOH Bart just showed how the surprise can be avoided so .... > It's only a surprise if you enable the option without understanding what it does first. Too true. >clang -I${include_dirs} test.c What would be the point of this expanding to "clang -I test.c"? It seems entirely reasonable to drop that word entirely and expand to "clang test.c", which is what actually happens. vq Well, whatever more experienced people think. I have no skin in the issue, but my intuitive sense of it is than a 'nothing' should just be nothing, but it shouldn't go killing things that are not nothing. It's probably not debatable, and it doesn't matter anyway. Especially if there are other examples of that sort of thing, then it might not be considered a surprise. But if that's the only place where it happens, then I'd say it's questionable. That expansion is sure cool, but I don't think it should kill entire strings: echo "what's wrong with this string? $@", especially since it leaves it alone if we use " $* ". Dunno. All I can say is that rc itself seems to agree with me.