From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14088 invoked by alias); 14 Apr 2017 23:40:04 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22668 Received: (qmail 6887 invoked from network); 14 Apr 2017 23:40:04 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f175.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.175):SA:0(-2.3/5.0):. Processed in 1.97303 secs); 14 Apr 2017 23:40:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: anthony@bifb.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at bifb.org does not designate permitted sender hosts) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=2BfYZsxqDiEytfMshq6Q1T5OpcutiNwMKdMBz4dDxvA=; b=Eicat9g9VsWUQRk9z32MohT/BWhkYTrQPsac3oD+uL5CcIMXWNhITQ3CK8xgYVGm1m r57NpX/JOGkRZX8SOWN9vMtfznDhLRbaMfyxuW/631kKjMz6kpMFjEVPiqVkTPCA7CRc 2vggOBqVuVPloetPhT9g7wKqVExKi0eGkwy7+f5JZoA0vrKfFkeqZSkYhnd0wIval79U fK7pMAd+qNO7TtAyBuJJYtf1Zu4mCe1q4HK3rOyFrK0EAvPVQlHPLfvi2xVeM48oiNvQ Ro93P/jtYfU+HzfwQnRyn4hfXVMvtAOxSa11L+nMBGbp0lCxAIEmoRY3OO/LAt/dHCTT aPBQ== X-Gm-Message-State: AN3rC/7JRJACnOPeg0Nfa4dzliUN/FKF431fLAfBkIBhGQqeWYuxpSH8 m3Z8LTmRUIbMcqro X-Received: by 10.55.177.193 with SMTP id a184mr68543qkf.210.1492213195257; Fri, 14 Apr 2017 16:39:55 -0700 (PDT) Date: Fri, 14 Apr 2017 19:39:54 -0400 From: Anthony Fletcher To: Bart Schaefer Cc: "zsh-users@zsh.org" Subject: Re: allow zsh to source a script and then become interactive Message-ID: <20170414233953.GA29526@teapot.bifb.org> Mail-Followup-To: Bart Schaefer , "zsh-users@zsh.org" References: <20170414165548.GA13756@teapot.bifb.org> <4642151492209711@web5m.yandex.ru> <170414161445.ZM15667@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <170414161445.ZM15667@torch.brasslantern.com> User-Agent: Mutt/1.8.0 (2017-02-23) 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.