Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Running "unset path" breaks PATH despite emulation being enabled
- X-seq: zsh-workers 41652
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Eric Pruitt <eric.pruitt@xxxxxxxxx>
- Subject: Re: Running "unset path" breaks PATH despite emulation being enabled
- Date: Fri, 8 Sep 2017 13:30:05 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AceCFvIJiLpdZZTbpWH7t43B7uWcZOYMfk//4B9BTzE=; b=r98hM8z8CynrgVLvDU/Rz7jhxFFOTzkwU7noKOxgU9miE7UZkU2R5S3QinYkRqA969 QZGLp1QnoM0wjRYm+0AgcI/QSWcOeAZrPsBZa5bLT5S7gQV1KjgQHeJX/GZONpOgeCuo CWZGEL/0Dx1roOX/7+lhPhnLy8OGFpdbkwJXjOtcXcikuS1a0bgMm6ICxlQedkYp5N2S 7doJH+I/1uN1aYkuTgaikpcWRXVWzwigxBHa/bqNEn9oR6kH+MmUKwuT6eDcAO9WJ5d1 cnS2aSf7AZYyeTzvam/Mv1pWTQ39DFpGVaqlui5qSLs8s69QDaeQLIxw4det5MoNACq7 TjKQ==
- In-reply-to: <20170908082917.v5j4vczoq75vs5lk@sinister.lan.codevat.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170908082917.v5j4vczoq75vs5lk@sinister.lan.codevat.com>
On Fri, Sep 8, 2017 at 10:29 AM, Eric Pruitt <eric.pruitt@xxxxxxxxx> wrote:
> According and <http://www.zsh.org/mla/users/2015/msg00180.html> and the
> manual, Z shell should become roughly POSIX compatible when using
> "emulate sh". When using emulation, running 'path=""' does not break
> PATH command execution, but running 'unset path' still does which seems
> like a bug to me:
>
> $ zsh -c 'emulate -L sh; path=""; ls /dev/null'
> /dev/null
> $ zsh -c 'emulate -L sh; unset path; ls /dev/null'
> zsh:1: command not found: ls
This works fine if you start zsh as sh though, ie either make a
symlink ln -s =zsh sh; ./sh or do ARGV0=sh zsh
It can't really work in the 'emulate sh' case since the parameter
$path is then already created and it would be quite controversial for
emulate to remove parameters from the shell environment.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author