From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 263 invoked by alias); 15 Apr 2017 02:45:11 -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: 22670 Received: (qmail 22605 invoked from network); 15 Apr 2017 02:45:11 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f178.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.217.178):SA:0(0.5/5.0):. Processed in 2.813864 secs); 15 Apr 2017 02:45:11 -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=0.5 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_SPAM,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.178 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=I3IF03dpv0Ei3CC1Vrrul8l9BdI1/w6KDa5pGxwKB7E=; b=RXuxORG+rnJPCsjzodpfEOYnWno6XvacdTwRq0uBdqollVcta/wDKZ1A3Cz1BY6oMs usv8h20isvWeQ53K5VIfqi9/mfXvIBawycIGZtva0EufW9tHa8D2UGSH1qDRiPeLFZs5 T4I/O8pD8ZgdSMs7SnbRxE53E40W4iuj9NQJj2KmEZF9EtWDuI03VavLRdOxvk+xb/tV tXJJu43ap1bc2VRdV6te1o2X8HYxbd6aE7BmNAXrIz6jRS78dO+5qhvbL3OyV/vB7GMC Le8x+YBCyaYRnD4N+AQf7fYCDXoTXw0d3IryOUQNzCqRvHcx0GzptCpOgJZkW+fX5l34 RQ4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=I3IF03dpv0Ei3CC1Vrrul8l9BdI1/w6KDa5pGxwKB7E=; b=FAfoGNMtyNeUi1azSTfAfqSiUFoNcDJhg+daSMFy7gFEn1/TAn34ugtFE48lQcb6uJ B8MwUK4MQxPfzy95LTc1IZtlu2Kthw2GQ5mZaYRcXY6QPVWxVsj/oR4T6dekwU7VrZaz 0ki6ujUDN7lHNNiWif+VomO01XZP2qZx1xHxYzIOvDVaXlT5C2ULzOJU/mz6OIIXmBJe KnJ7rqFhb3QRAgVmRFjXLvRVr0mXk/fCDz24qKPhxy1i8pQli3JcMUNI6KaN4ceq1Q1V LHfvE3MnWKiV7g1dkVSlLyqDJvcd2MiiwvGBNDhlyZeoSAzQ5uz8JYb8UrRP1/3PALDr YhsQ== X-Gm-Message-State: AN3rC/4+wPFyoxxJtRZJETk1bqu73pZbFFHgvkpYF2gX+D384h6N6Na4 1V4OKWw2dpS9niUT X-Received: by 10.176.0.106 with SMTP id 97mr5257485uai.120.1492224303271; Fri, 14 Apr 2017 19:45:03 -0700 (PDT) From: Bart Schaefer Message-Id: <170414194530.ZM16516@torch.brasslantern.com> Date: Fri, 14 Apr 2017 19:45:30 -0700 In-Reply-To: <20170415010045.GA12706@fujitsu.shahaf.local2> Comments: In reply to Daniel Shahaf "Re: allow zsh to source a script and then become interactive" (Apr 15, 1:00am) References: <20170414165548.GA13756@teapot.bifb.org> <170414132858.ZM15204@torch.brasslantern.com> <20170414220341.GA24751@teapot.bifb.org> <20170415010045.GA12706@fujitsu.shahaf.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: allow zsh to source a script and then become interactive MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 15, 1:00am, Daniel Shahaf wrote: } Subject: Re: allow zsh to source a script and then become interactive } } Anthony Fletcher wrote on Fri, Apr 14, 2017 at 18:03:42 -0400: } > See the extra "teapot% " prompt that sneaks in. Instead run } > } > PS1='' zsh -fis <<<"source /tmp/setup } > and it does the desired thing. Brilliant. } } You must be using an older version. In current versions, PS1 is no } longer read from the environment, so you should set it to empty inside } the here string. Setting it in the here-string is too late. The prompt is printed even before the here-string is read. However, I tried it, and PS1 is imported by zsh built from current git. The parameters not imported are: _ * # EGID EUID GID histchars HISTCHARS IFS KEYBOARD_HACK module_path OPTIND path PS4 TRY_BLOCK_ERROR TRY_BLOCK_INTERRUPT UID USERNAME zsh_eval_context