Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: allow zsh to source a script and then become interactive
- X-seq: zsh-users 22668
- From: Anthony Fletcher <anthony@xxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: allow zsh to source a script and then become interactive
- Date: Fri, 14 Apr 2017 19:39:54 -0400
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bifb-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2BfYZsxqDiEytfMshq6Q1T5OpcutiNwMKdMBz4dDxvA=; b=RlPXKKOwCjCsFmIZGWwafiCLh8p6CkIGVT1jTWlPqvImb+uU0KkNqs21YosNJlRykD Ojg6rJqFWyeC+HL/jnlZjatj8lgYXhb1jZ1O5mi0APdIYmlpuBRv+yWnbdZN2Y2ZuPtz TNFc4Xo0chJ6cUTG5OiMi24ts2J0+UMx2AysCkNd+OqflSp8Om6s2xOqXeQQLCaV1/FG H5+jq/s+DrKrNIzqdkFynlud4M4sU2jKxtODATDaFWOWXX/I9wzOZ4K9SSruSKNZWKTr mfp3fpwtQcULWqAW82JGCsUJP32vrd9pJORj31jEO7JZMfap4MJCDd6zQgBt6J1HJJzp sNNA==
- In-reply-to: <170414161445.ZM15667@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20170414165548.GA13756@teapot.bifb.org> <4642151492209711@web5m.yandex.ru> <170414161445.ZM15667@torch.brasslantern.com>
On 14 Apr 2017 at 16:14:45, Bart Schaefer wrote:
> On Apr 15, 1:41am, Nikolay Aleksandrovich Pavlov (ZyX) wrote:
> }
> } I tried to play with
> } `ENV==(<<< $'emulate zsh\necho abc') ARGV0=sh zsh`,
> } but apparently this does not work: e.g. I do not see `$path` variable
> } in this case, though I do see `abc`. Guess $ENV is too late to
> } switch emulation mode and have all necessary initialization steps be
> } performed.
>
> Using "emulate" only changes setopts, it doesn't re-initialize other
> state that would be in place before the startup files are sourced.
>
> Good idea, though -- it might work for Anthony's case. I'd recommend
> "emulate -R zsh" for more thorough option reset.
Sadly not. One of my start-up files contains
typeset -U path PATH
path[(r).]=()
and this gives the error "path: attempt to assign array value to
non-array". So it isn't completely in zsh mode. Playing further I
provoked a segmentation fault! This dies:
ARGV0=sh zsh -c 'typeset -U path PATH'
(zsh version 5.2.6 on Fedora).
Anthony.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author