From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18381 invoked by alias); 9 Jun 2015 15:53:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35425 Received: (qmail 17321 invoked from network); 9 Jun 2015 15:53:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f794b6d000001495-e8-557709b24270 Date: Tue, 09 Jun 2015 16:43:37 +0100 From: Peter Stephenson To: "zsh-workers@zsh.org" Subject: Re: In POSIX mode, ${#var} measures length in bytes, not characters Message-id: <20150609164337.1719611d@pwslap01u.europe.root.pri> In-reply-to: References: <55738EFE.1050805@inlv.org> <20150608094420.1ce01d90@pwslap01u.europe.root.pri> <55764D2A.2040301@inlv.org> <20150609093543.4f463867@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsVy+t/xy7qbOMtDDdb+NrI42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGS8PTmQr2M9a0bP7AlsD4waWLkZODgkBE4m5r9cwQdhiEhfu rWfrYuTiEBJYyihxZeNzRghnBpNEx9e3rBDOVkaJv+svgbWzCKhK7J77iA3EZhMwlJi6aTYj iC0ioC9x8c8tIJuDQ1jAR2LVw2yQMK+AvcTtzSvASjgFgiWOfX4B1iok8INRousSK4jND9R6 9e8nqIvsJWZeOcMI0Sso8WPyPbC1zAJaEpu3NbFC2PISm9e8ZYaYoy5x4+5u9gmMQrOQtMxC 0jILScsCRuZVjKKppckFxUnpuUZ6xYm5xaV56XrJ+bmbGCFB+3UH49JjVocYBTgYlXh4FZTL QoVYE8uKK3MPMUpwMCuJ8O59AhTiTUmsrEotyo8vKs1JLT7EKM3BoiTOO3PX+xAhgfTEktTs 1NSC1CKYLBMHp1QDY8VLd+EFn3TWagnUpfmXiV1a2rfAion/1cLjXDf92XxOvLrS4PHb9tzu ZVMbklq2z3iV9/RSR+jePXUFJxVmCyT/7bKyy9I8ZezFolXMESxu+ojXcYfFw7IWne1HpXhZ jqn+UHGubJU0WmVUfvhY6gc9pv4MNofzH97f8OvjuL2/IGXNnwsFSizFGYmGWsxFxYkAeUHB 51YCAAA= On Tue, 9 Jun 2015 08:37:05 -0700 Bart Schaefer wrote: > On Tuesday, June 9, 2015, Peter Stephenson wrote: > > > > > > I can't remember why POSIX_ARGZERO isn't on, or even if there was > > actually a reason. > > > > > The doc actually does explain this, for once. > > For compatibility with previous versions of the shell, emulations use > NO_FUNCTION_ARGZERO instead of POSIX_ARGZERO, which may result in > unexpected scoping of $0 if the emulation mode is changed inside a function > or script. So we'd have to special-case the top-level emulation on the assumption once a sh, always a sh. Not clear if it's worth it. pws