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

Re: Qustions about ZLE widgets.



Andrej Borsenkow wrote:
>dup_characters () {
>	local char
>	BUFFER="" 
>	read -k char

I do not recommend using `read' in a widget function.  I expect it will
screw up the tty mode.  When I find the time to implement it, there will
be a proper way to input characters within ZLE.  (It would be nice to
make read safe to call from within ZLE anyway.)

>	BUFFER="$BUFFER""$char""$char" 

"$BUFFER" is guaranteed to be empty at this point, as you cleared
it above.  Is this what you intend?

-zefram



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