zsh-users
 help / color / mirror / code / Atom feed
* cursor position in a variable
@ 2015-09-05 18:36 david sowerby
  2015-09-05 19:05 ` Mikael Magnusson
  0 siblings, 1 reply; 4+ messages in thread
From: david sowerby @ 2015-09-05 18:36 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-06 11:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-05 18:36 cursor position in a variable david sowerby
2015-09-05 19:05 ` Mikael Magnusson
2015-09-06 10:50   ` ZyX
2015-09-06 11:54     ` Mikael Magnusson

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