[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[OFFTOPIC or BUG] is it possible to move the cursor in prompt?



Hello!

I tried to make a bombastic prompt, giving me a "headline" on the screen.
Therefore I moved the cursor with the `tput sc`, `tput move 0 0` to the
bottom of screen, tried to print out 100 characters and then go back with
`tput rc`.

The problem: I have svgatextmode, 100x37 screen size. The result is weird,
it cuts after the first 80 chars, or, trying other solutions, it produces
other strange output.

Is it intended to be possible what I'm trying to do (and failure therefore a
bug), or am I doing "wrong" things?

The procedure I used:
set_prompt ()
{
local SAVE_CURSOR=`tput sc`
local HOME=`tput cup 0 0`
local REST_CURSOR=`tput rc`
local BOLD=`tput bold`
local FOREG=`tput setf 4`
local BACKG=`tput setb 6`
local NORMAL=`put sgr0`
PS1="${SAVE_CURSOR}${FOREG}${BACKG}${HOME} (over 80 spaces) ${NORMAL}${REST_CURSOR}\h$ "
}

set_prompt
export PS1

Thank you,
Marcus

-- 
"Rhubarb is no Egyptian god."                         Debian GNU/Linux
Marcus Brinkmann                                      http://www.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: