From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23659 invoked by alias); 19 Oct 2012 08:26:28 -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: 17333 Received: (qmail 28809 invoked from network); 19 Oct 2012 08:26:27 -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 Received-SPF: neutral (ns1.primenet.com.au: 209.85.219.43 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=ggKCJZ+3zFmDsnW+/Cx6nTzU4vWtBNJd00jdn+Odfjs=; b=AJ8jkku1um1Ot9Uko4XMfMQJ3WAk04E8fXRwm4oQKqaNv0dtyu2W1v+Mtd+pSIBBP4 uD6f0cKL45ZmgeSHDp6fUcdVyWzZ6CbUa5LoZ1yOrIlXeu6V7mHeNe3DE04kiHio3Ap1 q1Hm6biFCxG76DWqQ306D/PjCjB7gIw5EYAiUSaYzfW58Doe21iwSf5tUVZrr1TzYygE 7IaXBN5F4NK2uJL1fNWA/w0GsezVZWEhQSaLvoEcR/Bo0w7beHjNmjuUAqb0QkU4Pu7b cHxNXp/U2yYJFKdfndpLavdA47UQk9mCnTpmOn1Pm8EpVGnW7Q8YU4f/cJVrWaVVZ6rX MUXQ== MIME-Version: 1.0 X-Originating-IP: [80.239.194.50] In-Reply-To: <20121018221826.GA6056@localhost.localdomain> References: <20121018221826.GA6056@localhost.localdomain> Date: Fri, 19 Oct 2012 09:26:22 +0100 Message-ID: Subject: Re: z flag in parameter expansion doesn't use $IFS ? From: Peter Stephenson To: zsh-user Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlaFALggk5aCP6HZaWo41iVNCrNkOwNRcJ9+6DT9HBLm0iR/1FkWDILVb0I2dE6H7Px8KSM 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