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

help with read in zsh 3.0/3.1



i have the following code in my precmd() function only for zsh versions which are at least 4.1 (don't have 4.0 anywhere so i don't if it would work there):

local escape colno lineno
IFS='[;' read -s -d R escape\?$'\e[6n' lineno colno
(( colno > 1 )) && echo ''

this code was provided to me by Bart Schaefer (I believe) and allows my zsh to know whether or not it needs to perform an echo before issuing it's LF

the problem is that at work i have some boxes which i need to use zsh 3.0/3.1 on, i would also like to use this code there but zsh 3.0/3.1 don't have -s or -d for read, Bart Schaefer provided me with some pointers on how it might be done but I couldn't really get anything to actually work the way the zsh 4.1 read does.

any ideas on how to make that code into a code block that would work for 3.0/3.1?

thanks for any help.

Jordan



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