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

Re: Howto to print ENTER to zle-buffer?



On Dec 13,  5:47pm, Andy Spiegl wrote:
}
} > If for some reason you really need the command executed within ZLE,
} Actually, yes.  It's for sort of a session-management I'm trying to write.

Usually better if you say stuff like this up front, it helps to have
context when trying to answer a question!

Given this -- and assuming you can target zsh-5.3 -- I'd go with:

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



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