Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to make underlining of a command line disappear after an ordinary key press? (2)
- X-seq: zsh-users 14483
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: How to make underlining of a command line disappear after an ordinary key press? (2)
- Date: Sun, 11 Oct 2009 18:58:36 +0100
- In-reply-to: <433290.81065.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0910101440k4cf7e2e6t4cf2dc132b514ec@xxxxxxxxxxxxxx> <433290.81065.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Sat, 10 Oct 2009 15:07:42 -0700 (PDT)
Guido van Steen <gvsteen@xxxxxxxxx> wrote:
> I had actually tried that before, but I got:
>
> "ordinary-key-press:2: job table full or recursion limit
> exceeded"
Are you sure you called .self-insert and not self-insert within the new
widget? If you used self-insert the widget would call the function over
and over, with that error. If you use .self-insert you're guaranteed
it's calling the internal widget and you can't get recursion.
> Moreover "zle -N self-insert ordinary-key-press"
> might bind some non-ordinary keys as well.
You can check within the widget. The string $KEYS contains the literal
keystrokes used to invoke the command. Test with something like
if [[ $KEYS = [[:print:]] ]]; then
# reset behaviour for any printable character
fi
zle .self-insert
although of course it's up to you what keys to bind the special
behaviour too.
By the way, with space be sure it's not bound to magic-space.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author