From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id eb160b1f for ; Sat, 30 Mar 2019 22:08:56 +0000 (UTC) Received: (qmail 2389 invoked by alias); 30 Mar 2019 22:08:43 -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: List-Unsubscribe: X-Seq: 23892 Received: (qmail 17163 invoked by uid 1010); 30 Mar 2019 22:08:43 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f68.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.1/25398. spamassassin: 3.4.2. Clear:RC:0(209.85.128.68):SA:0(-2.0/5.0):. Processed in 1.522378 secs); 30 Mar 2019 22:08:43 -0000 X-Envelope-From: robobenklein@gmail.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.128.68 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=YMTgrphnXuFWA60wJ3hPVTjbZDD3sxSo8Dn90REEdvo=; b=GGmdjaKun8MZpmDPbPjUHpqp7OVJwdf+zIb7fBPkusfEio8aeJhj+wp+kynadbawkF tSWgzwUTsMK3jix0HOHU4/qomuE0ExBHchwNQaCZBkrEMO7pLvQR3J2ZXceoXFAJ1ExN KLgS4/mOZO2dYxKnDU9OwnbtGWcA/+I+55uZ98uxUoNlfpkkcq5cadAK2kTpjDSWwwir xH6wtOq36SRlKCrvxEpuGpweN61anjCTKXsTgG3CoaWgy9kXOlhr2FVNwVVoqzj3V7q8 M80nDYXriLIriKwt7q8ZjkwAd4H0E+Inv9/PLvNSHbK6+e0wGld4oaFRVnaMVnXu+3AQ a70g== X-Gm-Message-State: APjAAAV2LC7edE90mLKS+KNzzyCFxIpBJl0tXGJz9r7xGrxA+M2naH+f qrm656fh6sBK/+IJZsUk5/J5dI3Fqpgcfb+fA8x7fA== X-Google-Smtp-Source: APXvYqwYM4GrkmHF0jw50HpCtAILJECMlB2AL2Nmg/ZLJEusadWxRzbAONj6SSdtClQmyvWghXwihNaaawrSvi2nLiY= X-Received: by 2002:a1c:e185:: with SMTP id y127mr8244133wmg.76.1553983687880; Sat, 30 Mar 2019 15:08:07 -0700 (PDT) MIME-Version: 1.0 References: <9962ac48-b31d-4a80-be61-52f1f60ad3af@www.fastmail.com> In-Reply-To: From: Ben Klein Date: Sat, 30 Mar 2019 18:07:56 -0400 Message-ID: Subject: Re: Automate keypresses To: Daniel Shahaf , Christian K , Zsh Users Content-Type: multipart/alternative; boundary="000000000000b3f5910585570513" --000000000000b3f5910585570513 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 > 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? =E2=80=94 >> >> $ { echo PS1=3Dfoo; echo exit } | zsh -ifs >> bar% % >> foo % >> $ >> >> (Those percent signs are from the PROMPT_SP option) >> >> Cheers, >> >> Daniel >> > --000000000000b3f5910585570513--