Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bindkey -s question

On Sat, Apr 18, 1998 at 10:11:54AM +0000, TGAPE! wrote:

> Right here's your key - -s puts the keys on the line as if you typed
> them.  Try typing 'echo -n ^[c' on the command line and see what
> happens.

D'Oh!  It completely slipped my mind that I would have to include the ^V in
the bindkey out-string, too.  That completely solves the problem; my saved
lines are reset, the screen is cleared, and I get a prompt printed (which
was what I wanted ... not to reset to a G0 charset and sane tty, though it
probably wouldn't hurt to throw that in anyway :).

I'm still not sure I see what's going on WRT the widget solution.  It,
after all, should do the echo exactly like I want.  I tried putting the
echo in a function and binding ^L to call that function, and that worked
fine, so I don't see why it doesn't work in a widget, unless I explicitly
have to tell zsh to print a prompt afterwards.

Anyway, thanks much.  That should teach me not to try to learn new things
on so little sleep.  ;-)


Messages sorted by: Reverse Date, Date, Thread, Author