Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [bug] Special parameters $PATH and $path aren't kept in sync after emulating sh
- X-seq: zsh-workers 47528
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [bug] Special parameters $PATH and $path aren't kept in sync after emulating sh
- Date: Mon, 9 Nov 2020 10:07:25 +0000 (GMT)
- Archived-at: <https://zsh.org/workers/47528>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-11/1101218972.1247457.1604916445509%40mail2.virginmedia.com>
- 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
- 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==
- Importance: Medium
- In-reply-to: <a342172f5c6b83d74cba750b45e1dbb6@waegenei.re>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <a342172f5c6b83d74cba750b45e1dbb6@waegenei.re>
- Sender: zsh-workers-request@xxxxxxx
> On 09 November 2020 at 07:27 Brice Waegeneire <brice@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author