Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Qustions about ZLE widgets.
- X-seq: zsh-workers 3228
- From: Andrej Borsenkow <borsenkow.msk@xxxxxx>
- To: Zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxxx>
- Subject: Qustions about ZLE widgets.
- Date: Tue, 10 Jun 1997 17:23:00 +0400 (MSD)
- Reply-to: borsenkow.msk@xxxxxx
I started to experiment with new ZLE fetaures, and am a little confused.
The following is supposed to create simple function which just replaces
buffer with duplicated input character, creates widget for it and binds it
to some character string:
dup_characters () {
local char
BUFFER=""
read -k char
BUFFER="$BUFFER""$char""$char"
CURSOR=$#BUFFER
}
zle -N dup_characters dup_characters
bindkey \^X\^D dup_characters
The result is slightly strange (for me at least):
case 1:
bor@itsrm1:~%> ^X^D =>
zsh: use 'logout' to logout.
case 2:
bor@itsrm1:~%> a^X^Db =>
bor@itsrm1:~%> abb
If I continue with ^X^D =>
bor@itsrm1:~%> abb <- (unprintable symbol follows, NL)
<- cursor is here
Case 3:
bor@itsrm1:~%> aaaaa^X^Db =>
bor@itsrm1:~%> abb
I tried with and without zsh -f; the version is the latest 3.1.2-beta.
thanks in advance
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author