Guys, forgive me if this question has been asked before. I did a search first, and I didnt see anything similar to this in the 3+ pages of results.
I am rebuilding my prompt. This machine is a laptop, thus I wanted to add my battery status to the output, but I didnt really want it displayed on my prompt. So i started playing with tput.
tput outputs correctly. BUT, if I dont tell tput to move up 1 row, it will not display.
tput cup x x
if the "cuu1" is not used before the save cursor, the tput does not display. If i try to undo the move up one row by using a carriage return inside my prompt, the tput does not display.
atm, the script works, but if any list or commnd issued follows the prompt.
[mypromptishere]$ ls -l
file1 file2 file3 file4 file5 file6
[mypromptishere]$ file7 file8 file9 file10
thus like the above, because tput moved up 1 row the last line of the output is put after my prompt instead of my prompt being put after the last row of the output.
anyone have any ideas? Or know of a fix for this?