From: Thiago Padilha <tpadilha84@gmail.com>
To: zsh-users@zsh.org
Subject: How to restart zle without invoking 'accept-line'?
Date: Wed, 30 Oct 2013 09:30:31 -0200 [thread overview]
Message-ID: <CAAq2XdpsH3kS9_LP2b9MapdGZAJ0kTzLQa5LmY34MUOuhLXneA@mail.gmail.com> (raw)
[-- 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?
next reply other threads:[~2013-10-30 11:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 11:30 Thiago Padilha [this message]
2013-10-30 15:31 ` Bart Schaefer
2013-11-03 21:53 ` Thiago Padilha
2013-11-04 18:14 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAq2XdpsH3kS9_LP2b9MapdGZAJ0kTzLQa5LmY34MUOuhLXneA@mail.gmail.com \
--to=tpadilha84@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).