zsh-workers
 help / color / mirror / code / Atom feed
From: Andrej Borsenkow <borsenkow.msk@sni.de>
To: Zsh workers mailing list <zsh-workers@math.gatech.edu>
Subject: Qustions about ZLE widgets.
Date: Tue, 10 Jun 1997 17:23:00 +0400 (MSD)	[thread overview]
Message-ID: <Pine.SV4.3.95.970610171147.977K-100000@itsrm1> (raw)

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
-------------------------------------------------------------------------



             reply	other threads:[~1997-06-10 13:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-10 13:23 Andrej Borsenkow [this message]
1997-06-10 14:12 ` Zefram
1997-06-11  5:41   ` Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SV4.3.95.970610171147.977K-100000@itsrm1 \
    --to=borsenkow.msk@sni.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).