Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Getting back a command after hitting CTRL-C
- X-seq: zsh-users 12969
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>, Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Getting back a command after hitting CTRL-C
- Date: Tue, 17 Jun 2008 14:02:57 +0100
- In-reply-to: <20080617124808.GK10734@xxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>, Mikael Magnusson <mikachu@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70806170505v24c8d557g146a73d2cd553bab@xxxxxxxxxxxxxx> <237967ef0806170512q29a269ceo799ae02a70dc8f45@xxxxxxxxxxxxxx> <2d460de70806170527m59a16377hb6919bc7ad8f65a3@xxxxxxxxxxxxxx> <237967ef0806170528x3a563ca2i990a642a7d168311@xxxxxxxxxxxxxx> <20080617123812.GG5016@xxxxxxxxxxxxxxx> <20080617124808.GK10734@xxxxxxxxxxxxxxxxxxx>
On Tue, Jun 17, 2008 at 02:48:08PM +0200, Vincent Lefevre wrote:
> On 2008-06-17 13:38:12 +0100, Stephane Chazelas wrote:
> > This seems to work:
> >
> > trap 'zle kill-buffer; zle -R' INT
>
> But this badly interacts with the completion system. For instance,
> under Debian:
>
> vin:~> trap 'zle kill-buffer; zle -R' INT
> vin:~> dpkg -s [TAB][Ctrl-C] (where the Ctrl-C is typed quickly enough)
> _deb_packages_update_installed:zle:6: widgets can only be called when ZLE is active
> vin:~[1]> dpkg -s
> zsh: do you wish to see all 2370 possibilities (1186 lines)?
>
> Then I type 'n' and get:
>
> vin:~[1dpkg -s
[...]
To be honest, I didn't quite expect it to work in the first
place, which is why I said "_seems_ to work". You can probably
adjust it to avoid those clashes though:
trap 'zle && zle kill-buffer && zle -R' INT
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author