Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: fixing ${1+"$@"} when word-splitting
- X-seq: zsh-workers 22261
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: PATCH: fixing ${1+"$@"} when word-splitting
- Date: Mon, 13 Feb 2006 09:43:38 -0800
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <EXCHANGE03NXLbrBmWU0000c118@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20060211181440.GA30984@xxxxxxxxxxxxx> <200602122026.k1CKQHGH003629@xxxxxxxxxxxxxxxxx> <20060213105349.GD31780@xxxxxxxxxxxxx> <EXCHANGE03NXLbrBmWU0000c118@xxxxxxxxxxxxxxxxxx>
On Mon, Feb 13, 2006 at 11:34:38AM +0000, Peter Stephenson wrote:
> local IFS=.-
> print -l ${=1:-1.2}
[...]
> but now gives
> 1.2
This is due to the multi_isarr weirdness: when it is 0, multsub()
returns the resulting array joined with $IFS[0], which is what was
occurring here. I added this line to fix the problem:
--- Src/subst.c 2006-02-13 09:25:18.000000000 -0800
+++ Src/subst.c 2006-02-13 09:30:33.000000000 -0800
@@ -347,6 +347,7 @@
if (!*x)
break;
insertlinknode(&foo, n, (void *)x), incnode(n);
+ mult_isarr = 1;
}
switch (c) {
case Dnull:
This makes sure that when we split the string into multiple pieces
before parsing it, it will be returned as an array.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author