From: Bart Schaefer <schaefer@brasslantern.com>
To: Oliver Kiddle <opk@zsh.org>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: separate watch/log functionality out into a module
Date: Sun, 31 Oct 2021 20:11:21 -0700 [thread overview]
Message-ID: <CAH+w=7bm60WQw0scd9boMKDrcQjYQh89d-qA-yqPxKOX6uQqMw@mail.gmail.com> (raw)
In-Reply-To: <99024-1635725195.643285@RFFV.JZgp.GVTq>
On Sun, Oct 31, 2021 at 5:07 PM Oliver Kiddle <opk@zsh.org> wrote:
>
> The autoloading of modules from parameters is not ideal where the
> parameters come from the environment.
Hm. What would the right behavior be? Do we need a flag on the
autoloaded parameter for whether the value is [not?] allowed to come
from the environment? PM_DONTIMPORT seems potentially relevant.
> For an example with an unpatched zsh, this is not great:
> options=foo zsh -df
> zsh: options: attempt to set slice of associative array
> And unlike for WATCH, that's a fatal error so zsh exits.
I think you're misinterpreting what's happening. If I use gdb:
(gdb) set environ options=foo
(gdb) run -df
Starting program: Src/zsh -df
zsh: Can't add module parameter `options': parameter already exists
ubuntu%
I get your error if I try to assign to options in the environment from
the current zsh:
ubuntu% options=foo Src/zsh -df
zsh: options: attempt to set slice of associative array
ubuntu%
But the shell where I did that does not exit, the error aborts the
command so no new shell is ever started.
If I unset options first, the new shell complains:
ubuntu% (echo $$; unset options; options=foo Src/zsh -df )
695688
zsh: Can't add module parameter `options': parameter already exists
ubuntu% echo $$
695694
(this is all without your patches)
next prev parent reply other threads:[~2021-11-01 3:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 22:15 Oliver Kiddle
2021-11-01 0:06 ` Oliver Kiddle
2021-11-01 3:11 ` Bart Schaefer [this message]
2021-11-06 0:17 ` Oliver Kiddle
2021-11-06 20:53 ` Bart Schaefer
2021-11-28 20:56 ` Oliver Kiddle
2021-11-29 4:31 ` Bart Schaefer
2021-11-09 10:27 ` Jun. T
2021-11-09 21:09 ` Daniel Shahaf
2021-11-11 11:06 ` Jun T
2021-11-11 17:08 ` Oliver Kiddle
2021-11-12 9:19 ` Jun T
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='CAH+w=7bm60WQw0scd9boMKDrcQjYQh89d-qA-yqPxKOX6uQqMw@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=opk@zsh.org \
--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).