Heyas
I'm thinking about a new approach for my core display, basicly as it should make aligments easier.
Issue i'm currently facing, is tput cup
capable of printing on the current line?
My best achievements were:
:) tui $ tput cup - 60;echo " ------ testing" ------ testing
<... some more lines in the terminal...>
+ tui $ tput cup - 60;echo " ------ testing"
Alot better was (but still not working/acceptable):
~ $ tput cup $LINENO 50 ; echo another test
another test
:) ~ $ tput cup $LINENO 50 ; echo another test another test
:) ~ $ tput cup $LINENO 50 ; echo another test another test
~ $ tput cup $LINENO 50 ; echo another test another test
+ ~ $ tput cup $LINENO 50 ; echo another test
But that is taking the line number of the bash history, not of the terminal.
However, once screwed up, the which-line-nr-alignemnt seems to be fitting... somehow...
Fill a variable with such output, and print that then, doesnt work too well either, ouput jumps to lline 0.
So basicly my question is, how to figure out on which line of the current terminal i am?
And then just print on that, using the aligment of tput?
tput cup 0 0
Send the sequence to move the cursor to row 0, column 0 (the upper left corner of the screen, usually
known as the "home" cursor position).
tput cup 23 4
Send the sequence to move the cursor to row 23, column 4.
To my eyes it doesnt look like such a 'task' was thought of/is supported?
Any ideas/thoughts where or what i might head for digging?
Thank you in advance
---------- Post updated at 17:54 ---------- Previous update was at 17:45 ----------
Addition:
I was hopeing to avoid 'short lines' if any escaped chars (such as colors... ) are/were beeing passed/printed.