It normally includes PWD (Present working Directory) path in each command. When
you are working in directories with descriptive names and depth of 6 to 10,
command prompt takes lot of screen-space. When you are dealing with long commands
which are inherently complicated, this stupid prompt causes them to overflow into another line..!!! It is *really* annoying situation.
Finally, I decided to waste few hours for cleanup of my prompt.
It's not very complicated work. It needs editing few lines in ~/.bashrc file.
The $PS1 is the variable which controls the behavior of the prompt.
The PWD path information is undoubtedly useful and should be accessible, but we don't need
it embedded in prompt for each command. The username, machine name and whole path is always visible on the Title bar of terminal window, and is updated automatically with each directory change. So, lets drop this information.
I still add '\W' option, which gives the name (and not whole path) for working directory.
It gives the context of each command without wasting any screen space.
Other options added are
'\t' - tells time of command execution
'\${?}' - tells the success or failure of last command. (0 represents success)
So, my $PS1 variable looks like this.
PS1='[\t][${?}][\W]\$ '
After some googling, I came across how to add colours in prompt. And after adding
colours, My PS1 variable became
PS1='\[\033[01;32m\][\t]\[\033[01;34m\][${?}]\[\033[01;32m\][\W]\[\033[01;34m\]\$\[\033[00m\] '
Another improvement was done by modifying the root prompt in similar way but to use RED color
which will warn user to be careful. Following will generate similar (but reddish) prompt for root.
PS1='\[\033[01;31m\][\t]\[\033[01;34m\][${?}]\[\033[01;32m\][\W]\[\033[01;31m\]# \[\033[00m\]'
Here is my new prompt in action !!

PWD is having depth more than 10 which can be seen from the title bar,
but still the command prompt is clean.
It also includes the color switch when logged in as root.
Also, one wrong command is executed whose return status can be seen on the prompt afterwards.
Here is the link which will give information about other possibilities with prompt.
The various possible color codes that can be used are given here.
Here is my ~/.bashrc file with important line highlighed.