> On 29 April 2022 at 14:21 Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
> hello, I was wondering if it is possible to prepopulate $BUFFER before
> rendering the prompt.
> I tried doing so in preexec, but it didn't work. Is there some other
> function I can override to do this?
You need "print -z" --- it has all the usual options of print but the result
ends up in the line buffer when the line editor starts.