Re: [XFree86] IBM z/OS xterm and bash-prompt title changing ???

2003-05-29 Thread Andy Goth
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


Re: [XFree86] IBM z/OS xterm and bash-prompt title changing ???

2003-05-29 Thread Andy Goth
On Wednesday, May 28, 2003 10:59 pm, Marc Aurele La France wrote:
 On Wed, 28 May 2003, 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\$ 
 
  Do you have any suggestions, I don't know where to begin.

 Try apostrophes instead of quotes.

From the bash man page:

[When inside double quotes,] the backslash retains its special meaning only 
when followed by one of the following characters: $, `, , \, or newline.

Therefore, the only \ that disappears is the one preceding the $.  This is 
only a problem when running as root (euid 0)--\$ should expand to #.

(I assume you're using bash because you list cygwin.)

Hey, I didn't know vt100 and vt102 supported changing the window title...  Are 
you sure that's really what you mean to do?

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


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