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 22670
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: allow zsh to source a script and then become interactive
- Date: Fri, 14 Apr 2017 19:45:30 -0700
- 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==
- In-reply-to: <20170415010045.GA12706@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20170414165548.GA13756@teapot.bifb.org> <170414132858.ZM15204@torch.brasslantern.com> <20170414220341.GA24751@teapot.bifb.org> <20170415010045.GA12706@fujitsu.shahaf.local2>
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 </dev/tty && exec </dev/tty"
} >
} > 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author