From: Mikael Magnusson <mikachu@gmail.com>
To: Eric Pruitt <eric.pruitt@gmail.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: Running "unset path" breaks PATH despite emulation being enabled
Date: Fri, 8 Sep 2017 13:30:05 +0200 [thread overview]
Message-ID: <CAHYJk3RD6p7PwRaZSUbJSAE0Bi6_2+NKLC3MV+32Lh+PmzsAdA@mail.gmail.com> (raw)
In-Reply-To: <20170908082917.v5j4vczoq75vs5lk@sinister.lan.codevat.com>
On Fri, Sep 8, 2017 at 10:29 AM, Eric Pruitt <eric.pruitt@gmail.com> 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
next prev parent reply other threads:[~2017-09-08 11:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 8:29 Eric Pruitt
2017-09-08 11:30 ` Mikael Magnusson [this message]
2017-09-08 16:17 ` Peter Stephenson
2017-09-11 8:58 ` Peter Stephenson
2017-09-09 4:24 ` Eric Pruitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3RD6p7PwRaZSUbJSAE0Bi6_2+NKLC3MV+32Lh+PmzsAdA@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=eric.pruitt@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).