On Wednesday, May 28, 2003 9:50 pm, Bovy, Stephen J wrote:
> I am having great fun with xterm on IBM z/OS
> but I can't seem to get bash prompt title changing
> to work.
>
> Here is my prompt string:
>
> if    "$TERM" == "cygwin" || "$TERM" == "xterm" || \
>       "$TERM" == "vt102" || "$TERM" == "vt100"   ; then
>   export PS1="\[\e]0;\h \@ [\W]\a\e[34;42m\][\w]\[\e[0m\]\n\$ "

This string works fine for me in konsole and xterm.  Have you tried with 
several different terminals?

Also, have you verified that the PS1= line ever executes?  It looks to me like 
you forgot to use [ (or test):

if [ "$TERM" == ... ]; then ...; fi

You also don't appear to have a matching fi.

One way to check is to directly type (or paste) the PS1= line at the prompt.  
Another way: put a debugging echo statement in your if.

For the record, here's my prompt code. :^)

export 
PS1='\[\e[1;[EMAIL PROTECTED]|\[\e[34m\]\w\[\e[30m\]]\[\e[35m\]\$\[\e[0m\] 
'

(all one line, with one space preceding the final ')

This prompt I always want.  Then below, I make the check and if using a 
supported xterm, append to the PS1.

case ${TERM} in wterm*|xterm*) export PS1=${PS1}'\[\e]0;ducks: \w\a' ;; esac

(using bash; otherwise change ${...} with $...)

I do a few other things in the case statement, like stty erase ^? to fix some 
problems with wterm (which I use on computers where I don't have KDE).

-- 
Andy Goth  |  [EMAIL PROTECTED]  |  http://ioioio.net/
End communication.

_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86

Reply via email to