Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Detect if zle recursive-edit ended by Ctrl-C
- X-seq: zsh-users 21591
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Detect if zle recursive-edit ended by Ctrl-C
- Date: Sun, 22 May 2016 15:53:23 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=rhJaPGtyA6qc0RtmkaKrifB0vlJCdKsqjzQ7RSIOlpk=; b=cTh17ZSCHlCfvXCbliMeio/LBcHV5FWJ+O1WVbhDAtbhaoFEhvLoKlmeQeVCjJIHGU u18QfbC9IvY0DboIW4Zj4rOI4zIdIjaKXcQGLLXAWF0RD28nPyNxeix556iK6gf5JgkB E7IC3dCQR2RikxBUEpS3Uxrm7wqK8lzER9jy74zv+vSJheAjEm5Ikq2xayt43UxNxvYz 8RleGqdH7ryvQHpjsMKvvxy8L9gURn+Y5aopcJ9FmdYtUJjoWj25hKA4qizEd2LnIwzk U25OaXnPHWD4ogfOO6t1i5pEnxhI/5/P+Dd17H07Edro/BP1O+sHzyPTQqN9mjS44svE O/WA==
- In-reply-to: <CAKc7PVDJzXTS-vHqhu4aXdfCOBAOk5F8_sCFgnyZu81F+gXaQw@mail.gmail.com>
- 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
- References: <CAKc7PVDJzXTS-vHqhu4aXdfCOBAOk5F8_sCFgnyZu81F+gXaQw@mail.gmail.com>
Apparently Ctrl-C sets $? to 1, and accept-line to 0, so this is quite simple
Best regards,
Sebastian Gniazdowski
On 22 May 2016 at 15:49, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> Hello,
> I need to detect if recursive-edit is ended by Ctrl-C. Is that
> possible? I could overload accept-line to know when recursive-edit is
> ended by enter, but not touching such widgets makes code clean. Is
> there other way?
>
> Best regards,
> Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author