From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16644 invoked by alias); 19 Oct 2012 09:04:13 -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: 17334 Received: (qmail 27313 invoked from network); 19 Oct 2012 09:04:12 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Fri, 19 Oct 2012 16:53:27 +0800 From: Han Pingtian To: zsh-users@zsh.org Subject: Re: z flag in parameter expansion doesn't use $IFS ? Message-ID: <20121019085327.GC6056@localhost.localdomain> References: <20121018221826.GA6056@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12101908-1976-0000-0000-0000127EEA91 On Fri, Oct 19, 2012 at 09:26:22AM +0100, Peter Stephenson wrote: > On Fri, 19 Oct 2012 06:18:26 +0800 > Han Pingtian wrote: > > It looks like the z flag of parameter expansion doesn't care what the > > value of IFS is: > > Yes, this is correct. It's using the shell grammar for this. If you > type "echo foo", it doesn't matter what IFS is, it will always treat > that as two words with space as separator. The other splitting flags > use IFS. > > > I just found that it looks like the z flag won't cause "forced joining" > > which stated in rules 10, like this: > > Yes, (z) is not like the other splitting flags. It's a utility for when you > need something that obeys shell parsing rules. It's not a simple > word-splitting tool, which is what the other splitting flags are for. > > pws Thanks a lot.