Clarification on gnome-terminal window title escape sequence



Hi,

Am running a gnome-terminal on Linux with bash shell and am trying to
set the dynamic title using the shell variable 'PS1'.


Case 1:
------
I set PS1 as follows:

export PS1="^[]2;bash - $HOSTNAME:\${PWD#$HOME/}^G$PS1"

and this worked fine by setting the dynamic title for the terminal
window.


Case 2:
------
Now since the above prompt string is long I broke half of it into a new
line and set PS1 as follows:

export PS1="^[]2;bash - $HOSTNAME:\${PWD#$HOME/}
^G$PS1"

Pls. note that there's a new line in the above quoted string.

This failed to set the dynamic title as the new line in the above PS1
string causes the escape sequence to be ignored, but the same works fine
on 'dtterm'.

Since am not sure if it's a intended behaviour of vte/libzvt
(gnome-terminal) pls. let me know if it's a bug that has to be handled.


Thanks & Regards,
Raj.



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