Afficher un message
Vieux 20/05/2007, 12h51   #4
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Get current cursor row as ASCII #

2007-05-18, 07:59(+00), Bill Marcum:
[...]
> stty -echo; echo -n $'\e[6n'; read -d R x; stty echo; echo ${x#??}
>
> "read -d" works in bash or zsh; see the manual for other shells.
>
> I would use tput instead of echo, but terminfo doesn't seem to have a
> name for the \e[6n sequence.

[...]

It's sometimes found in u7.

$ tput u7 | od -c
0000000 033 [ 6 n
0000004

--
Stéphane
  Réponse avec citation
 
Page generated in 0,05359 seconds with 9 queries