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=-1.0 required=5.0 tests=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 9e399d13 for ; Sat, 30 Mar 2019 22:00:24 +0000 (UTC) Received: (qmail 17329 invoked by alias); 30 Mar 2019 22:00:09 -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: 23891 Received: (qmail 22237 invoked by uid 1010); 30 Mar 2019 22:00:09 -0000 X-Qmail-Scanner-Diagnostics: from atl4mhob21.registeredsite.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.17.115.115):SA:0(-1.9/5.0):. Processed in 1.654643 secs); 30 Mar 2019 22:00:09 -0000 X-Envelope-From: scowles@ckhb.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at ckhb.org does not designate permitted sender hosts) Date: Sat, 30 Mar 2019 14:59:29 -0700 (PDT) From: "scowles ckhb.org" Reply-To: "scowles ckhb.org" To: Christian K , zsh-users@zsh.org Message-ID: <549947770.477270.1553983169578@webmail6.networksolutionsemail.com> In-Reply-To: References: Subject: Re: Automate keypresses MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_477269_868782881.1553983169573" X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.10.0-Rev23 X-Originating-Client: open-xchange-appsuite ------=_Part_477269_868782881.1553983169573 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > On March 30, 2019 at 9:47 AM Christian K < syphdias@gmail.com mailto:syphdias@gmail.com > wrote: > > > Hey, > > 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. > > Best, > Christian > i believe pcmd may be the kind of utility you are looking for. this is the header info citing attribution: * pcmd: Push characters into tty input buffer. * * 1988-09 John H. DuBois III (john@armory.com) * 1989-03-13 Last BSD version * 2002-03-18 UnixWare port. Use getopt. * 2004-05-10 Linux & MacOS X port. Use termios. i routinely use this on linux, bsd, macos. if you have trouble finding a source repository for it, pm me. s. cowles scowles at ckhb dot org Key fingerprint = A156 277B 875A D6E3 A00C 23D9 869E 72BE 1FD3 5B80 ------=_Part_477269_868782881.1553983169573--