zsh-users
 help / color / mirror / code / Atom feed
* How to restart zle without invoking 'accept-line'?
@ 2013-10-30 11:30 Thiago Padilha
  2013-10-30 15:31 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Thiago Padilha @ 2013-10-30 11:30 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-04 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-30 11:30 How to restart zle without invoking 'accept-line'? Thiago Padilha
2013-10-30 15:31 ` Bart Schaefer
2013-11-03 21:53   ` Thiago Padilha
2013-11-04 18:14     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).