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

populate next comand line from precmd

hello, I was wondering if it is somehow possibile to populate the command
line within the precmd function. What I am trying to achieve is: from a
normal function (not a zle widget) I would like to set some variable, to be
read in the precmd function where it is used to populate the next command
line and also set the cursor position. I know how to do it from a widget,
but from what I know there is no way of doing this from outside a widget,
am I right?

the desidered behaviour would be:

$ special_function par par2 etc [accept-line]

$  special_function par par2 etc (already compiled, some params may be

I don't want to:
modify the accept-line widget
modify history so that the modified version of the line is at a press of
the up key

this is more of a "can this be done in this way?" question

thanks in advance
Pier Paolo Grassi
email: pierpaolog@xxxxxxxxx
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO

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