From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 8b81b7e2 for ; Wed, 24 Apr 2019 16:02:01 +0000 (UTC) Received: (qmail 17167 invoked by alias); 24 Apr 2019 16:01:44 -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: List-Unsubscribe: X-Seq: 23935 Received: (qmail 8400 invoked by uid 1010); 24 Apr 2019 16:01:44 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f175.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.1/25426. spamassassin: 3.4.2. Clear:RC:0(209.85.166.175):SA:0(-1.9/5.0):. Processed in 1.785832 secs); 24 Apr 2019 16:01:44 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.175 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=drmRI2OOJYNYFZf2mWQ/oFvwth2TGyrXoAac1SMkh+U=; b=gB35D2frVRfj0IvKSx8qNm5eqaPLc4LaByQLC8/hAfDDUMk5SXvWeiQue26T554zog +0fspYTO/l8JyNRRIdlDfn1eM8N/cLX3ppeMVd7rgK0sIjObbrsP3o2TJT5KuWK2jMg9 YimSMnV0Kj8SspLCNYzO3qpURc0G50mslUZMq9v9xLm97vliDdx/WHPVyCKp2wu+82tz wTLW2alD9TU0Hpa4bz7Q570nzuSYLaF2HBpowUl42HM/WaNzjGTDzjS/Gl3jAI3mIVPH CIprpqRoJ3ngX85wvpfZ3uuKAODPvGrDpivx5xvYVAFt/GtE+DhvXGaLOjTW3PqSzn7r i7uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=drmRI2OOJYNYFZf2mWQ/oFvwth2TGyrXoAac1SMkh+U=; b=GUQfJplXBBFwTvGqr2Sf6rN/hG1ifhNEpbcbfUbaAKlJG5xdkO8B0rr3JCh82yCP0P YUIRUkAjohwXmO6vBogdsB0O3mBnzwH5/zoniEV6ADTgJ9UcNbiU4rfKOaNVCG3P8DS5 7Ttg2PIMhpE74QAdk77p9PAqh6c0VCv1Cbe/9yG6tRquNNxS/KrY9cd9WMPpKcVcZQdD XXLqumIvHISY/ks0P9dJFP8APK64v8o9ay1+WilhNakBtMR0GNlDtDGG0VpuuJTXpKSi 3TI4tRpwqIx/yLFMJ/YOavVOLl6EQPYcq7vWZN1tDfTd2Zi0jXgNBD4I7/auaMRO32I4 ifEw== X-Gm-Message-State: APjAAAVoNIogp6WlH4GOk4/K69E3dZT6dJ02FQMP/lYkEOj8KvgKtABk eWlNJRSUuAqn0sMjB5ur18ZhdBnGsgQjH2ktQU0kcin3to0= X-Google-Smtp-Source: APXvYqw1lFHFWbEru0BcP/FjbmsArhESG1O1vSwcOs1+QefEXru/HqvWgutn/yp3bvWbMnweExodOhUfHX3I8MF65bE= X-Received: by 2002:a02:c99a:: with SMTP id b26mr4992259jap.32.1556121668080; Wed, 24 Apr 2019 09:01:08 -0700 (PDT) MIME-Version: 1.0 References: <20190410125557.GA19114@cventin.lip.ens-lyon.fr> <1554902053.6252.6.camel@samsung.com> <20190410141113.GD15169@cventin.lip.ens-lyon.fr> <1554907186.6252.12.camel@samsung.com> <20190411104040.GA29775@cventin.lip.ens-lyon.fr> <20190424123144.GA21402@zira.vinc17.org> In-Reply-To: <20190424123144.GA21402@zira.vinc17.org> From: Bart Schaefer Date: Wed, 24 Apr 2019 09:00:54 -0700 Message-ID: Subject: Re: print builtin preceded by parameter assignment To: Zsh Users Content-Type: text/plain; charset="UTF-8" On Wed, Apr 24, 2019 at 5:33 AM Vincent Lefevre wrote: > > There are several bugs (perhaps all related): > > 1. The fact that TZ remains exported with a value different > from $TZ. This is not related (and is not actually the case). TZ does not remain exported. What remains is that the settz() call has changed the current timezone of the zsh process to be something that differs from the value of the TZ environment variable. >> 2. The fact that TZ and other variables (at least LC_ALL and CDPATH) > are handled differently with a variable assignment before a > builtin, when not exported. This is also not really related. CDPATH is not an environment string in the first place, it's an internal variable used only by zsh; the fact that it can be exported is irrelevant to the behavior. The difference with LC_ALL is that it is recognized as semantically meaningful to the shell, so it has special code to invoke setlocale() whenever it changes. TZ is not specially handled in the same way. > 3. The fact that for TZ, the "export" status has an effect on > the value taken into account in a builtin. Underneath this comes down to a system library issue: The library behaves differently depending on whether settz() [or setlocale()] has been called, and if it has not been, then it behaves differently depending on whether the values are truly in the process environ array. Its questionable whether zsh can (or should) track and special-case every environment variable that has such side-effects.