Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Strange behaviour of setopt and binkey in a widget
- X-seq: zsh-users 15016
- From: Mike Perdide <mike.perdide@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Strange behaviour of setopt and binkey in a widget
- Date: Tue, 20 Apr 2010 22:57:20 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ctYh/rvG8ieSV/QT+6Q3VhoqEuK5LkDj3OnLmHpru9E=; b=E+PPzW4mfRPpJEYDl9wLtECQP4de8hWwWR/n1yKHkqA+VI0hxXkkGWAa/HD3bm9fpH q9r098DWvst7HiRyvPoYXyvDrnZWTkWVI92IguXpRPP8W2VOQbsR6cMApQ4LaESSA0Ci 5VVwBO3P4unSi540O1+N2IOqCG8LK3HTxINaU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qU40cLnkPXamFmKQqRfkGy8WFVm8gvN9+h/2XUGAJ+z9R/27OygnsnW6IDAZx5VeAa X5aWHhbU0TeNun+2GweQ8bj4up5jUzgE0kuecjKSROtx/Dh4Z+1f+I88VrtdSZ787jxa TyWiJfu712+Oen2N7AIrAzjd63LmpJXAtK5PU=
- In-reply-to: <20100420104731.670bb5f7@xxxxxxx>
- 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: <w2m8c8a289c1004200202n5ad1e316pb78a0ba44f043b30@xxxxxxxxxxxxxx> <20100420104731.670bb5f7@xxxxxxx>
2010/4/20 Peter Stephenson <pws@xxxxxxx>:
> On Tue, 20 Apr 2010 11:02:29 +0200
> Mike Perdide <mike.perdide@xxxxxxxxx> wrote:
>> [22:49] :~$ zsh
>> north.~% <CTRL-O> <CTRL-D>
>> zsh: use 'exit' to exit.
>> north.~% <CTRL-D>not really exiting
>> !!! First strange behaviour : the prompt is not redrawn. At
>> this point I press <ENTER> to get my prompt back :
>
> This isn't actually strange at all if you consider that all widg0 done is
> echo "not really exiting" to the screen. You haven't told the shell to
> redraw the prompt. The way to do this is tell ZLE you're taking over the
> display for a bit, so that when the widget exits it will redraw the prompt
> below:
>
> widg0() {
> zle -I
> echo "not really exiting"
> }
Thanks for that -I option, I wouldn't have guess it's utility : ). It
works like I wanted, althought it seems to take some time to be active
:
[22:15] :~$ zsh
north.~% <CTRL-O> # Bind widg0 to ^D
north.~% <CTRL-D>
zsh: use 'exit' to exit.
north.~% <CTRL-D>
Deactivating ...
>> north.~% <CTRL-P> <CTRL-D>
>> !!! The previous ligne is rewritten with these two :
>> [22:53] :~$
>> zsh: use 'exit' to exit
>
> This actually did exit the shell for me (which is what you want, although
> I'm not sure now much I expected it given the ^D wasn't bound to anything
> any more and it's being processed by zsh, not handled directly as EOF which
> zsh has to synthesise). Does "stty -a" show that ^D is the EOF character?
It does : "eof = ^D;"
It exits the shell for me too, but prints this message "zsh: use
'exit" to exit", so I'm guessing I'm still doing something wrong.
Moreover, I manage to get a segfault error by using virtualenwrapper
and wigets, but that's another story.
Thanks fo your help !
Messages sorted by:
Reverse Date,
Date,
Thread,
Author