Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Automate keypresses
- X-seq: zsh-users 23892
- From: Ben Klein <robobenklein@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Christian K <syphdias@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Automate keypresses
- Date: Sat, 30 Mar 2019 18:07:56 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=YMTgrphnXuFWA60wJ3hPVTjbZDD3sxSo8Dn90REEdvo=; b=b2GG2bqumaVM0G9zrT2UH4C0BxuhsVcj0VxiAsRiAGoX4IM9KlS6iHpzA3M3y5nrLW 8wjhEmQ2Vnh1XcMpaiwiLjo7wUXyq3PatSONNn5th3+PpQsKA0s+ROdIvldsS3elrd4p I+2zl4FOq+FqWEncnosXZ7XacaEIONfEmMLzVLfTKcXnbbySTb0oshXAPRHN8gdX2joe WdHdhcyrADtyllzNKLBx5EkdiNJGoa12P60EhjwGJqAoXLb/LjLqpW+vVX2U+3dKNFrz em885ZFkJ94n7puTa+/j3d7wjBRhyQs8r7uow2pTTbkzPbtxE7sDpVWuVEbWCGWapKrM eIAQ==
- In-reply-to: <CAC8p+dW3yGJ_0c3KgRYGp_6aVoD+dbHuLsB=gtdmptFbOA2P-A@mail.gmail.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>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAJiY44qCAM8Q9vk_8o9kin-LX1ofLcvaiboG1dzq3tb-3HRHRw@mail.gmail.com> <9962ac48-b31d-4a80-be61-52f1f60ad3af@www.fastmail.com> <CAC8p+dW3yGJ_0c3KgRYGp_6aVoD+dbHuLsB=gtdmptFbOA2P-A@mail.gmail.com>
My bad - precmd does indeed get executed, but it seems that I am not
getting $RPROMPT rendered when using `zsh -is`.
Also, why do we get PROMPT_SP behaviour there and not in real interactive
use? Is there any option to echo the stdin input when it's being used? (vs
all at once before any prompts are rendered?)
*\Ben Klein*
About: https://unhexium.net/about/
Other places online: https://unhexium.net/ll/
Contact me securely: https://keybase.io/robobenklein
On Sat, Mar 30, 2019 at 4:09 PM Ben Klein <robobenklein@xxxxxxxxx> wrote:
> I think the real issue here is that such input would need to also execute
> the precmd and other shell hooks as if a human were physically pressing
> enter.
>
> *\Ben Klein*
> About: https://unhexium.net/about/
> Other places online: https://unhexium.net/ll/
> Contact me securely: https://keybase.io/robobenklein
>
>
> On Sat, Mar 30, 2019 at 1:56 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
> wrote:
>
>> Christian K wrote on Sat, 30 Mar 2019 16:49 +00:00:
>> > I'm trying to automate a benchmark for prompt render times with
>> > https://github.com/romkatv/zsh-prompt-benchmark. This requires a
>> pressed
>> > Enter key to work.
>> >
>> > Is there a way so simulate key presses without using something like
>> expect?
>> > Ideally this would also work in something like travis.
>>
>> Do you mean this? —
>>
>> $ { echo PS1=foo; echo exit } | zsh -ifs
>> bar% %
>> foo %
>> $
>>
>> (Those percent signs are from the PROMPT_SP option)
>>
>> Cheers,
>>
>> Daniel
>>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author