From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4721 invoked by alias); 20 Dec 2014 09:38:58 -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: 34020 Received: (qmail 19270 invoked from network); 20 Dec 2014 09:38:42 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_FSL_HELO_BARE_IP_2 autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1419067647; bh=MMzvfZrmqifpkzy+n+8vXD6jllGQTbXCn/rWChBmuI4=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=MdJkIprPYFlASgt7gXLs+p8x+uHdBcIW1lYO7nagRrTS+kv9U5PGZVYFnFdFzkRuO K9BaD8Wx7PAto7NiZJGW84pKljwYkCFxXpe56StkviSYwWA2osc/4PxU99jyC+ZFcS lTmhBK/1JPP5OEkGBgHZfzU7H7DwaWjWNfv5YiV4= From: ZyX To: Stephane Chazelas Cc: Peter Stephenson , "zsh-workers@zsh.org" In-Reply-To: <20141220001357.GA21647@chaz.gmail.com> References: <1054131418926765@web2o.yandex.ru> <20141218192917.4df5324b@pws-pc.ntlworld.com> <20141218194758.329bd9ef@pws-pc.ntlworld.com> <20141219181652.GA3996@localhost.mi.fu-berlin.de> <20141219212125.1e1fea6b@ntlworld.com> <798181419029050@web11g.yandex.ru> <20141220001357.GA21647@chaz.gmail.com> Subject: Re: [BUG] Unicode variables can be exported and are exported metafied MIME-Version: 1.0 Message-Id: <1136161419067647@web17g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 20 Dec 2014 12:27:27 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 20.12.2014, 03:22, "Stephane Chazelas" : > 2014-12-20 01:44:10 +0300, ZyX: > [...] > [about making the shell syntax locale-dependant] >>  bash: echoes $абв > > [...] > > You'd have gotten a different behaviour in a single-byte locale. > > Related discussion: > > http://thread.gmane.org/gmane.comp.shells.bash.bugs/22367 > > Personally, I think I'd rather shell variable names be limited > to ASCII [:alnum:]_. > > Making the shell syntax locale dependant is a problem in scripts > (and we're already affected by that to some extent with > utilities) because there, it's the *author*'s locale that > matters, not the user's. > > (Or else, you could do like rc and allow anything allowed in env > vars (rc allows any name as long as it's not empty and doesn't > contain `=`). `абв=1 rcsh -c 'echo $абв'` emits “line 1: syntax error near (decimal -48)”. Is it the difference between “A reimplementation of the Plan 9 shell” (http://rc-shell.slackmatic.org/) version 1.7.2 that can be found in the main portage tree and the original Plan9 shell? Or maybe I should simply use different syntax (rcsh -c 'echo $PATH' works though)? By the way, `env` allows empty name. -- Found this syntax: `абв=1 rcsh -c 'echo $(абв)'` echoes 1. But `абв=1 rcsh -c 'env; абв=10; env; echo $(абв)'` shows that rcsh removes `абв` from the environment and places variable named `__d0__b0__d0__b1__d0__b2` there instead. > > -- > Stephane