zsh-workers
 help / color / mirror / code / Atom feed
* Qustions about ZLE widgets.
@ 1997-06-10 13:23 Andrej Borsenkow
  1997-06-10 14:12 ` Zefram
  0 siblings, 1 reply; 3+ messages in thread
From: Andrej Borsenkow @ 1997-06-10 13:23 UTC (permalink / raw)
  To: Zsh workers mailing list

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@sni.de
-------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-06-11  5:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-10 13:23 Qustions about ZLE widgets Andrej Borsenkow
1997-06-10 14:12 ` Zefram
1997-06-11  5:41   ` Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).