I recently changed my PS1 prompt to set the title and icon text in the tty frame window to "[EMAIL PROTECTED]"; I wanted to put it in my PS1 as it catches "everything" -- from sudo/su to root (changes to [EMAIL PROTECTED]), to when I type "control-d" to exit a su script or log off a remote system -- the title maintains the correct [EMAIL PROTECTED] combination for non-local logins.

Problem has to do with ...I'm guessing (?) readline's idea of the Column.

Of course it doesn't know how "non-printing" (or text that doesn't generate a physical position as in the set-icon+title function). So I thought that it should be able to understand that a "CR" would return/reset the column to zero. That way it could correctly compute what column it was in.

Unfortunately it doesn't seem to work -- on "longer" lines -- those that are around 15-16 chars from end of line (set icon text is ~15-16 chars:
"\033]1;[EMAIL PROTECTED]").  I added the "CR" after the "\007" (hoping to
reset bash/readline's idea of the prompt-column to 0 at that point).

Is there a different way to do what I'm trying?  A different
"column reset" sequence known to bsh or rl?  Or a "PrePs1" type ENV var
that could be printed before the prompt with either it being the
user's responsibility to leave the cursor at col-0, or bsh/rl could
try to enforce by issuing a CR after the "pre-prompt" string, but
I don't know of any such mechanisms...

Doable/possible?

Thanks,
Linda



_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to