Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How can I debug lost keyboard input?
- X-seq: zsh-users 23660
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: How can I debug lost keyboard input?
- Date: Thu, 20 Sep 2018 12:10:56 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=glhhtXACFXfyCDMikfpOoEvd1oPUZZ/cayEBB171094=; b=Doang4r+j8DVIs7l50bau4weG6nybizFHgFBBvotuBs2D7INhUrcba5VYRj8drKAiV EURZkuFVKr3AcbjrTQgcNWAkTl9xA+ZS4hLHkRaWzexRx0UTdmCqrTpKQ6Hg/DT0MYO7 xlAZSvYMxt+T+oQu/Q27nAM1j5xRirTSd9/2ZARJ0EG1otuFiluiIk8Gfq2Yiu0oMLFS OMrp5/pBniyNkE1vTlAg5hLrXpMFryOe+4XFQkh6QBCEN9z73m4CWa/XMlCZYwEO5zYj hdKCyhoedrOJ1vuFECPVGs9LRH+qP2tcjCWpcn3/861HY/VA9ZPb7kCEBVX1H2BcPLGd srrA==
- In-reply-to: <20180919182732.6h4ytozjg4vt2bud@spiegl.de>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20180912184227.yahwsdnwfddtqv3m@spiegl.de> <20180919182732.6h4ytozjg4vt2bud@spiegl.de>
On Wed, Sep 19, 2018 at 8:27 PM, Andy Spiegl <zsh.Andy@xxxxxxxxx> wrote:
>> Any ideas how I can debug this?
> Unfortunately I still don't know a good way to debug problems like that.
> This time, I found the solution by reading zsh man pages over and over. :-)
>
>> BTW if I bind the functions to a different key the same thing happens.
>> Uhm, as if the function would have to be loaded/initialized on the first try?
>
> Turned out to be exactly that. On the first call the function file is
> loaded and the function initialized but NOT executed. So, I added the line
> "zle finer-forward-word" at the end of the function file - after the
> function definition. And now it works as expected again. zsh's default
> behavior of this must have changed recently, right?
>
> --------
> finer-forward-word() {
> local WORDCHARS=$WORDCHARS_FINER
> zle forward-word
> }
> zle finer-forward-word
> --------
>
> But is that the "correct" way to do it or just a dumb workaround?
Your mails are somewhat unclear, but if you have these functions
defined in autoloadable files then they should look as following
% cat finer-forward-word
local WORDCHARS=$WORDCHARS_FINER
zle forward-word
Ie, do not include the "finer-forward-word() {" and "}" lines in the
file. Your original versions probably work if you use autoload -k, but
you don't show your autoload lines at all in the example.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author