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

Re: prepopulate BUFFER



actually I have another question, is there a similar way of setting the initial cursor position like I would do setting the CURSOR var in zle widgets?

Pier Paolo Grassi


Il giorno ven 29 apr 2022 alle ore 16:16 Pier Paolo Grassi <pierpaolog@xxxxxxxxx> ha scritto:
perfect, thanks!

Pier Paolo Grassi


Il giorno ven 29 apr 2022 alle ore 15:29 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> ha scritto:
> 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.

pws



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