From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 16671 invoked from network); 9 Nov 2020 10:07:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Nov 2020 10:07:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1604916467; b=iYyNw488lG5vGP5anaxtp87pNnXfWCU7KM38C82CLFmQ2kx7Rk7cjHZBrYdiXEE7Qx4Tvlb6kB +UwOlhVV4bDdxoS7qNrHQFa9EIjdoCB6x5GIad3GRBXv4XgtssOnr3tJS3DGAUv0o4QaM6VcCF PD1Xrl55BvpFv2hGJ/h3mP2ukp4tXXVLb1rOGel93upxG78Xk5zass1kgMLJsIh54l3ox0BzJs 20QZRJ9x9dHgNlpUpxlKwKEYOzM1/41rdw7uRdITVJ/aeAKrsgeHZw/Dphb9BUOJ2at5yOC+8G 25glur5cBzOFIi4sp9XoAF4SK02Cs0slc1/FNHhj9iFR0A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1604916467; bh=EzY7UbHPA88prwnUn3dQ6C8a8rYq0trhV0ILOGCDbog=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=TMYTFdI7diVWVvcr5tQ+k5PSnyWzVhuW1hcsahd6lyuqSHkEFltVQ849PLJVNe3Jtj0+fHQewX QBbkBaO5htnUoaBYh/7loTBJhXPtYULiNBlD67BRXeeAN7R/w4SuVTH1sARqTWeeDqqM4tH7wj cxWeZ2LokEQtfC1+t/oE05bl6xAD21BSOHktK6NwnJCDenWHKFyx2uQEiAti17Gts1MNFHz2b2 4Ew0kPe3Eyz3l9tFL50xGy4Da7FyusIUqbye6dNbXkVYN5T9ohfIyQZAdtyl5VUrWPlRwuqsIG 9+CQL53SC99JFRB8K3f2AQupXl7yG58HTFksmFlWG4N/ww==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=La+RWF7ibBhWEua2J6lbT4LUUD51G4TQXE1ktiy/lUc=; b=vPQd3V16q9fkqUKaLRURgMMLPW h1/IreXhcgdKMNSbhkrq1N5tNBGjjwTU+V5w37eO/nYZifNDYdbRjKasUmiUr03d3r7hy5sJg6ajT j9rKI3uReNEyneqdvaJjL0A7mUYV4DAn/QGLOwysi7iJzAp5aGJLUtysCj96vUm8ohqkyk80XsCh0 yT14VvvK92I33sDy8S2XMZM6Pq7Ne4pwYN4tCVjmASjXpdOR6jybV2VuQejeg1J/6GDcdWN0ssHKP 5tR4aU9/G/ToglsSunAPPrRc0Ne0hCdrMJsu41zrz/pxSHke2s5yJdxOQXcukSK5h47dQqNUZ3bg/ QOxMIHHQ==; Received: from authenticated user by zero.zsh.org with local id 1kc45R-000IXC-Rh; Mon, 09 Nov 2020 10:07:46 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:41332) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1kc458-000IMz-Lu; Mon, 09 Nov 2020 10:07:27 +0000 Received: from [212.54.57.82] (helo=smtp3.tb.ukmail.iss.as9143.net) by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1kc457-0001nL-Iy for zsh-workers@zsh.org; Mon, 09 Nov 2020 11:07:25 +0100 Received: from oxbe20.tb.ukmail.iss.as9143.net ([172.25.160.151]) by smtp3.tb.ukmail.iss.as9143.net with ESMTP id c457kNEEN0Lrqc457kTitN; Mon, 09 Nov 2020 11:07:25 +0100 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.151 X-CNFS-Analysis: v=2.4 cv=fudi2H0f c=1 sm=1 tr=0 ts=5fa914dd a=Ip+kZtMD4PYul4iMASbA3A==:117 a=brd1hNE3X6AA:10 a=IkcTkHD0fZMA:10 a=eCkG9cKAQX0A:10 a=3PiKc6YZo-S4XOJmX7cA:9 a=QEXdDO2ut3YA:10 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1604916445; bh=EzY7UbHPA88prwnUn3dQ6C8a8rYq0trhV0ILOGCDbog=; h=Date:From:To:In-Reply-To:References:Subject; b=40SX1o9ANA1YpqJlHaMGEZqCR6S+CzHYSvqEE4j1zXP55oqh6yG1gbjOptQHw2LPg TvWPoThdXhpf7AE43o72T+AQgVDCsjcQGXBTG97DSCPyApkenxBfePWwk6EvVa4vem SNgG1sSeXS69qaiuyEHno/wiJSfbENFGuZaZdcmizLL47TUSuIl7zE95Ypq4904eBO QDaTlSNVwz40ktCQ3n9qBfKRF4JkkYLGuLfDU1NOIG1EyAbWDG2v3i9pykC0UZrPVa TZUxKM29cokkNw9PObmB82dBqw5EBJUwzYTMlWvZ0TPmHxs/8dFYYf8QbnWlKBxMIE jOR/4U4EUFtBA== Date: Mon, 9 Nov 2020 10:07:25 +0000 (GMT) From: Peter Stephenson To: zsh-workers@zsh.org Message-ID: <1101218972.1247457.1604916445509@mail2.virginmedia.com> In-Reply-To: References: Subject: Re: [bug] Special parameters $PATH and $path aren't kept in sync after emulating sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev72 X-Originating-IP: 165.225.81.103 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfL0R0Pj3WLw+TfJPcy2veQMOku37InmAu9Mx28wbDXMQEB2KvVD0pG/hKU/nkswhYE3IVSZLm16QdSVlhE5cVsps1SLfK7K306pJ+QsLljpER0XMzUIT tHzHAxuyr57KpF3jyWk+4yojz7E+w6e9GSptjppeR+ZqIGh9UzRwTpyfbQ8lS30Mxwn2fUTwsQJ/qD61W/iueh6Yz9jYcssPWIy09VlsxfGDDv337zaCMRTB X-Seq: 47528 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: > On 09 November 2020 at 07:27 Brice Waegeneire wrote: > Yesterday I stumbled upon a bug where setting $PATH when emulating > sh would would break the variable synchronization between the string > ($PATH) and the array ($path): sh mode doesn't have the special variable path; you need to rely exclusively on PATH within sh emulation. The basic idea of sh emulation is to track POSIX as closely as possible to make sure all the basics work --- it's not designed as an all-singing-all-dancing smart shell in the same way normal zsh mode is. In this case, that means we try to make sure variables people might use unsuspectingly in sh don't get overloaded with special behaviour. (Having said that, zsh is written in such a way there are various places where we can't make sh emulation work properly, but that's going rather beyond your issue.) Hooking up normal zsh behaviour and sh behaviour together can be a bit of a nuisance exactly because, by design, they work differently. So if you've got a workaround, I'm afraid that may be as good as it gets. pws