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

Re: Automate keypresses



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