Re: Clarification on gnome-terminal window title escape sequence



On Wed, Jul 02, 2003 at 12:02:29PM +0530, Rajkumar Sivasamy wrote:
> 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.

That is not the intended behavior.  The intended behavior is for the
newline (any control characters, really) to be replaced by an ASCII
space character, and for the resulting text to be used.

I'm seeing the intended behavior here, so I don't know why it's not
working for you.

Cheers,

Nalin



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