Terminator Command $PROMPT_COMMAND works in BASH but not KSH

Asked by Fred Rosenberg

Good Morning,

I am using Ubuntu 9.04 64 bit.

The title bar works properly with BASH, but does not work with KSH. The title bar says "none"

I have added this to my ~/.kshrc

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
   echo "in .kshrc starting a terminal"
    PROMPT_COMMAND="Hard Coded in .kshrc"

    ;;
*)
    ;;
esac

When I start a terminal session in Terminator, I get the following message (this tells me I am executing .kshrc and executing the code to set the PROMPT_COMMAND ):

in .kshrc starting a terminal

My variables are getting set properly:

/home/normalman>$ echo $TERM
xterm
/home/normalman>$ echo $PROMPT_COMMAND
Hard Coded in .kshrc

Can you help please?

Thank you for your time and consideration,

Fred

Question information

Language:
English Edit question
Status:
Solved
For:
Terminator Edit question
Assignee:
No assignee Edit question
Solved by:
Fred Rosenberg
Solved:
Last query:
Last reply:
Revision history for this message
Chris Jones (cmsj) said :
#1

I believe PROMPT_COMMAND is only used by bash. For ksh you probably want something like:

http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss4.4

Revision history for this message
Fred Rosenberg (contracorners) said :
#2

Thank you for your quick reply.

Alas, this did not work - I ended up with strange control characters in my prompt and "none" in the title bar.

My buddies convinced me that using KSH as a Linux shell is too much work (even though I use KSH at work every day), so I am using BASH as a basic shell, and continue to use ksh for scripting as a workaround. The terminal bar now works properly.

I guess that means this ticket can be closed.

Thank you for your time.

Fred