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

Re: Howto to print ENTER to zle-buffer?



> Usually better if you say stuff like this up front, it helps to have
> context when trying to answer a question!
You are right, sorry.  I had thought about it but then didn't want to
clutter up my (presumably) simple question with too much side information.

> Given this -- and assuming you can target zsh-5.3 -- I'd go with:
I'm still stuck with 5.2.  Guess I have to wait a while then. :-(

> autoload -Uz add-zle-hook-widget
> session-startup {
>   command-to-run args	# your thing here
>   add-zle-hook-widget -d line-init $WIDGET
> }
> add-zle-hook-widget line-init session-startup
Looks very smart but I'm not sure I understand how this works.
You define the function "session-startup" which is then hooked
to zle such that it is run after initialization?  How does it show
up in the zle buffer then?  No "print -z" anymore?

Thanks!
 Andy



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