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? — >> >> $ { echo PS1=foo; echo exit } | zsh -ifs >> bar% % >> foo % >> $ >> >> (Those percent signs are from the PROMPT_SP option) >> >> Cheers, >> >> Daniel >> >