From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12864 invoked by alias); 24 Nov 2014 16:54:53 -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: 19426 Received: (qmail 9895 invoked from network); 24 Nov 2014 16:54:51 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=AKpDk7pY c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=5y4faFyK3SkA:10 a=pGLkceISAAAA:8 a=GMspm-cEDkpIseHk3Y0A:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141124085508.ZM16833@torch.brasslantern.com> Date: Mon, 24 Nov 2014 08:55:08 -0800 In-reply-to: <20141124155524.0739b3ec@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: ${^var} and word splitting" (Nov 24, 3:55pm) References: <20141124095637.GA5716@chaz.gmail.com> <20141124111201.161d8cf2__23261.8202259347$1416827641$gmane$org@pwslap01u.europe.root.pri> <20141124152628.GA5749@chaz.gmail.com> <20141124155524.0739b3ec@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: ${^var} and word splitting MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 24, 3:55pm, Peter Stephenson wrote: } Subject: Re: ${^var} and word splitting } } On Mon, 24 Nov 2014 15:26:28 +0000 } Stephane Chazelas wrote: } > If I understand correctly, in zsh the removing of those are } > accounted to null-removal in things like: } > } > $ print -l $=a } > 1 } > 2 } > 3 } > } > But then it's not clear why they are removed there and not in: } > } > a=':a::b:' } > IFS=: } > print -l $=a } } I looked at the code and you're exactly right: it's not clear. Isn't it always the case that *whitespace* in IFS is treated differently than non-whitespace? E.g. consecutive whitespace is treated as a single character, so (IFS=" " "a b") is two words but (IFS=: "a::b") is three? I'm not actually able to try examples at the moment so maybe I'm just not following something.