Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with motion commands defined using match-word-by-style used with vi-delete
- X-seq: zsh-users 10180
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Problem with motion commands defined using match-word-by-style used with vi-delete
- Date: Mon, 24 Apr 2006 20:06:11 -0700
- In-reply-to: <dbfc82860604241239q34ee602an680fd20611d52018@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <060423085310.ZM31491@xxxxxxxxxxxxxxxxxxxxxx> <200604232308.k3NN8Wtj004945@xxxxxxxxxxxxxxxxx> <dbfc82860604241239q34ee602an680fd20611d52018@xxxxxxxxxxxxxx>
On Apr 24, 9:39pm, Nikolai Weibull wrote:
} Subject: Re: Problem with motion commands defined using match-word-by-styl
}
} On 4/24/06, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
} >
} > Here's a simple internal widget that reads a key sequence and sets
} > REPLY to the command bound to it (so you can run zle on that).
[Hmm, somehow I managed to miss PWS's message. I wonder if it was a
victim of Verizon's latest overeager spam-blocking fiasco.]
This is actually quite useful as it resets KEYS as well as sets REPLY,
so with this you can do
describe-key-briefly() {
zle -R "Describe key briefly: "
zle read-command
zle -M "${(V)KEYS} is $REPLY"
}
That doesn't help with describe-binding, which needs to map in the
other direction, but it's a start.
Incidentally I just noticed that within a widget called by using
execute-named-command, the value of $KEYS is carriage return. I'm not
sure what I expected it to be, but that wasn't it.
} There's still no easy way to execute the command in the right
} environment so that WIDGET is set to the read command that we want to
} execute.
It really *should* be the case that
local -h WIDGET
creates a new parameter named WIDGET that is neither read-only nor
special, but apparently the usual parameter rules don't apply to the
ZLE specials.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author