Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to restart zle without invoking 'accept-line'?
- X-seq: zsh-users 18074
- From: Thiago Padilha <tpadilha84@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: How to restart zle without invoking 'accept-line'?
- Date: Wed, 30 Oct 2013 09:30:31 -0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4OOmANozO+w54YyZ4Ssdx4fgPEbQ1t0Ed1i8cRr0XYE=; b=RlHZs5vS1/q3gpMOGzGDsyyPDpV5Yt7cfHPKKYIanhLhgLmSnZwUWpApSVTe3CGL2d AWHo3CqURZb8zFTrDeZmVzalkDZ5LJzIBsxNjgTrcPjmmWXBDud4iX0JHsqYIYTphE10 o1nv8i8Js6NsaBc1rQi2FZqlmPCHYJFFHruxu2ETex9OzlPMMP9OxlSmvENS7PoY8moV SpZm6xjLFcSflsEGsOEPgCm00m5wv0jMCpwWJIyvqOCL9BM1qEgTjta+y9Ekn5d+UtWT hBsBKWZTI2mZHU12w/d4Rn3HsE4fTmLvvOrGXeYo+jmikQCkBSVFh0sFwFbGamTYUu2/ TOTQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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