Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Automate keypresses



>     On March 30, 2019 at 9:47 AM Christian K < syphdias@xxxxxxxxx mailto:syphdias@xxxxxxxxx > 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@xxxxxxxxxx)
* 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


Messages sorted by: Reverse Date, Date, Thread, Author