Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from mail-pa0-f65.google.com by f.primenet.com.au (envelope-from <schaefer@brasslantern.com>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(209.85.220.65):SA:0(0.0/5.0):. 
 Processed in 0.143709 secs); 10 Aug 2016 22:56:32 -0000
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID
	autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: schaefer@brasslantern.com
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version;
        bh=BiJviB9xnr+OPsCNZnQSQgQi2aeF4V2/xd0IbHgtLaE=;
        b=IzK7oGNDHn+xVe06MdIxQEXpav7LswrzdOrUbK7+//m1r1aRMjG2QparmDnjHqVIru
         /+QyBUuDG70yNrqlXCPR8+YYOBIVYHfUbR0KcdvDCkPDbu97zKBnf/UdtUXgIWnaRgbF
         ZTFHgSuM3HyePLExJzPAtojrknRVI7BW9Gr1/daC2gvL+nmnhnYPF7+Zj/6mpC+DvaEp
         M4X8Supm+HDFJZJuvSUai0VTTMIKjwunOd1qLbaAXNcBU5PvohfRhFqVhFm4CgYOOrwo
         fnbS0HXNI0rIqGb1hzdUnJNGkDijETadgtE5rwJVVZZdGxykaVVF1yV7fy0/AUtmQ/2D
         +3Mg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version;
        bh=BiJviB9xnr+OPsCNZnQSQgQi2aeF4V2/xd0IbHgtLaE=;
        b=ievAofYvi+xuwUfPLdhsTxy253YtGiKFsxvhvWt2msSwf1GVkN4P4PQkoD2Ibko57N
         HP2E1oTfoKNCM/yt+EerWzBHSFJj1vDyvXAhq42g70o0klIfTeSTvnbIa3+A9N7wRDXy
         M0lqS53tYfS0Ac0XlydyjrdfEgC+u8Xg+r0UTd1dFS57zLzwpidTiXedGPmqh9h+aZkK
         KR3FDBnb1CsrfJ0P7nYMygg5x4eeHaPVk3HL61eCLXSqK0V/KH/5OpOrqllw9QI+x6mz
         hIswyMuEhcfyzFUrM2of87Yi2hW348H2eTHE5NmqSdopG+ddbdGnpYMOfF4AkQH67AQ0
         lbaA==
X-Gm-Message-State: AEkooutXG6gkpWgUt4LVMrLsP4Ebz4EkomV2jCP4uC6aCALa7JiaNXI+di7mOBh5kXgy7g==
X-Received: by 10.66.82.42 with SMTP id f10mr11396939pay.17.1470869783887;
        Wed, 10 Aug 2016 15:56:23 -0700 (PDT)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160810102836.ZM15324@torch.brasslantern.com>
Date: Wed, 10 Aug 2016 10:28:36 -0700
In-Reply-To: <20160809094013.01f0f5f8@pwslap01u.europe.root.pri>
Comments: In reply to Peter Stephenson <p.stephenson@samsung.com>
        "Re: [bug] shwordsplit not working on $@ when $# > 1" (Aug  9,  9:40am)
References: <20160808111626.GA19766@chaz.gmail.com> 
	<20160808192734.21923640@ntlworld.com> 
	<160808182124.ZM9355@torch.brasslantern.com> 
	<20160809094013.01f0f5f8@pwslap01u.europe.root.pri>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: [bug] shwordsplit not working on $@ when $# > 1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 39018

On Aug 9,  9:40am, Peter Stephenson wrote:
}
} On Mon, 08 Aug 2016 18:21:24 -0700
} Bart Schaefer <schaefer@brasslantern.com> wrote:
} > I *think* we can untangle this as follows, but then again I thought
} > I had untangled in in workers/29313, too.  This relies on the idea
} > that if we already have an array when nojoin, then we're not going
} > to split it again, which seems dubious somehow if there is explicit
} > use of the (s:-:) flag.
} 
} That was my first worry, looking at the change, but simple examples of
} this still work, so I can't see an obvious case where this isn't better
} than before.

It's better than before in that the two specific shwordsplit issues are
addressed.  However, I'm not sure that either of these cases is correct:

torch% x=(a:b "c d" ef)
torch% print -l ${(s.:.)x}
a
b c d ef
torch% print -l ${(@s.:.)x}
a:b
c d
ef

The first one agrees with zsh-3.0.8, so I guess it's no more wrong than
it ever was.  The second one used to work exactly like the first one,
and is the one that worries me the most.  I can fix that by testing
(nojoin % 2) instead of (!nojoin) but that seems like piling a hack on
top of a hack.

Then there's this weird edge case, where an empty $IFS acts like you
have specified the (@) flag when shwordsplit is set:

torch% IFS=
torch% setopt shwordsplit
torch% print -l ${(s.:.)x}
a:b
c d
ef

