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

How to restart zle without invoking 'accept-line'?



I've written the zsh-autosuggestions widget using 'recursive-edit' as it
was needed for updating zle asynchronously with zle -F. Heres the relevant
initialization code:

autosuggest-start() {
autosuggest-resume
zle recursive-edit
integer rv=$?
autosuggest-pause
(( rv )) || zle accept-line
return rv
}

zle-line-init() {
zle autosuggest-start
}

This code propagates accept-line to the main zle widget(user presses
enter), but how can I handle like ctrl+c which would normally cause zle to
restart without executing the command?


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