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

cursor position in a variable



I can get the cursor position by doing:
print "\e[6n"
this gives me the row and column. Though oddly the output appears after the next prompt, not on its own line. This
may (or nor) be why when I do:
pos=$(print "\e[6n")
print $pos
I get an empty line - and the output after the next prompt.
I want to use the row the cursor is on in a script -- so how do I get that into a variable? If not this way is there a way using ZLE?
thanks for any help   --------------dave
====================================================
Never trust a person who can clear their conscience of any immoral
act by asking forgiveness from their imaginary friend.



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