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 5740af70 for ; Sat, 30 Mar 2019 20:10:08 +0000 (UTC) Received: (qmail 8881 invoked by alias); 30 Mar 2019 20:09:51 -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: 23889 Received: (qmail 21774 invoked by uid 1010); 30 Mar 2019 20:09:51 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f66.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.66):SA:0(-2.0/5.0):. Processed in 3.765326 secs); 30 Mar 2019 20:09:51 -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.66 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=AidKWE7tG8RFELYZlQT/f111MX6xS8sEsVXn2KGiaIA=; b=A2kgYR6sevscAzciBPJpvSMfoz1+XabOdgNjoVsNx0y065aBpjIpSGd9vjK56AxeZa zTa8h+rQeNA6ieM+R6Wa43B5hprqS9LR2Or/vD1GuXPVaHWs6SaL785cRcWzd4fK15RP BvTzdTcil4Or561zCqWfN32t+3To0SNNjXmmEE0WK88djGXWJCYflo1xQS3rBj3+TmTs PNTRLPe4gJXMXh6QWC1IK92ZKldy9oTaq53UqkXe4Zvf0JMuMt0OC/VOPEiF/+xejSWU xN59R8EpG2DE8AeEmFDjT9rajruN/M/pNY6KZIRw24CNFU6WQke8Km75A1tUayZFmdq5 /FhQ== 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=AidKWE7tG8RFELYZlQT/f111MX6xS8sEsVXn2KGiaIA=; b=Zde2QjGWomjt1JqHJWWAxMiWJrJ9ezSDLCzprSEcdm85JKXPoEf2ojwHjHWDWpfBxv PsBIK7R+ai2D0QoWgM2BC4hxbmu81EMsQ2MC7tKnCIkrNrEkKkkfJao0dBpspxKg/NJW MKgpEknRACYi529jWmC4e9Yx5d9Rl8StC6RE2+I9d3/ets/nGCtUgn6ln0P3Cw4u3RAb wizhSjubbKwRi9afVUqdomDG2KmQ8yqUhWoPwf7Fh49bYjDMZbpuFZfrVsCQGTs5O6dF EPUF7Ej1GcATJ6rJ0DDpOoL2M3ZY7qXCT+eP2jitaA6Zi7CtLxgQ+onh6Lg6S8s8s0Mt V2Xw== X-Gm-Message-State: APjAAAXSfOUDX4SxJps1ZP1kkHUWitOB1U0iodfzCFhbeKKAFE19bYcJ ccU1kaVJSnNojg/Ztl1qax2t2u1O1Q/BhOEjPMdnJw== X-Google-Smtp-Source: APXvYqzOEfD0uELyuuC8x1o6RwElwYsx1r2xt2elsfYtuzHrU9kccMTTjfpe2HP5dgnJtr9v4owOdzcFRNj4XRyJ0Ds= X-Received: by 2002:a1c:cb0f:: with SMTP id b15mr7517665wmg.88.1553976552596; Sat, 30 Mar 2019 13:09:12 -0700 (PDT) MIME-Version: 1.0 References: <9962ac48-b31d-4a80-be61-52f1f60ad3af@www.fastmail.com> In-Reply-To: <9962ac48-b31d-4a80-be61-52f1f60ad3af@www.fastmail.com> From: Ben Klein Date: Sat, 30 Mar 2019 16:09:01 -0400 Message-ID: Subject: Re: Automate keypresses To: Daniel Shahaf , Christian K , Zsh Users Content-Type: multipart/alternative; boundary="000000000000682bc80585555c64" --000000000000682bc80585555c64 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 presse= d > > 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 > --000000000000682bc80585555c64--