You can use set -x to enable debugging and set +x to disable it.
If you have the debugging option enabled, BASH will print the value of $P4 for each line. By default, it is just + followed by a space. Try setting PS4='+ ' .
If this does not work, you have a Kornshell user who used $PROMPT_COMMAND to set the prompt. Usually, a hint displays useful information such as a username and directory. In BASH, you can do this using various escape sequences. For instance:
PS1="\ u@ \h:\w$ "
It will replace \u with the username, \h with the short host name and \w current directory based on the $HOME directory, if the user is in $HOME/bin , a prompt will appear
david@foo-sys :~/bin$
If the user is in /usr/bin , the prompt will be
david!@foo-sys :/usr/bin$
With Kornshell, you cannot use these escape sequences. Instead, you either call the cd or have a cd function that sets up the request. Or you use the syntax $(..) . I am using Kornshell and my hint looks like this:
PS1=$(print -n "`logname`@`hostname`:";if [[ "${PWD#$HOME}" != "$PWD" ]] then; print -n "~${PWD#$HOME}"; else; print -n "$PWD";fi;print "\n$ ")
Nastya, right? In BASH, I could do this:
PS1="\ u@ \h:\w\n$ "
In any case, itβs usual for Kornshell users to set the $COMMAND_PROMPT variable instead of using escape sequences when they use BASH because they know how to do it. And when you do this, you will see that the prompt command is printed every time. For example, I could set the BASH prompt as follows:
PROMPT_COMMAND="print -n "`logname`@`hostname`:";if [[ "${PWD#$HOME}" != "$PWD" ]] then; print -n "~${PWD#$HOME}"; else; print -n "$PWD";fi;print "\n$ "
and when I have set -x installed, I will see what prints every time.
What you need to do is go into $HOME/.bash_profile or, if $HOME/.profile does not exist, and get rid of the line where PROMPT_COMMAND set. Instead, change it to:
PS1="\e]0\ u@ \h:\w\a$ "
This is more or less the same invitation. If you do not want to change your .profile or .bash_profile , just do this:
$ unset PROMPT_COMMAND $ PS="\e]0\ u@ \h:\w\a$ "
Another possibility: you may not see that the tooltip is set to $HOME/.bash_profile , $HOME/.profile or even $HOME/.bashrc . In this case, you have a system administrator who has a Kornshell user, and they set the prompt in the /etc/profile file. You will have to override the invitation setting in your $HOME/.bash_profile file yourself by adding the two lines above to the end of the file.