[Virtual-pkg-base-maintainers] Bug#470230: base: Multiple lines on terminal does not works
Carsten Hey
c.hey at web.de
Tue Mar 11 14:49:42 UTC 2008
close 470230
thanks
Hi,
since Debian bug #53491 (where a user had the same problem as you) has
been fixed, /usr/share/doc/bash/README.Debian.gz states:
| 4. bash doesn't display prompts correctly.
|
| When using colors in prompts (or escape characters), then make sure
| those characters are surrounded by \[ and \]. For more information
| look at the man page bash(1) and search for PROMPTING.
This is exactly what is missing in your /etc/profile.
Additionally, the so called skeleton files, which are copied into the
home directory of a new user have an example for a colored bash prompt,
at least in current sid and when there is no other configuration files,
i.e. from SuSE Linux. So, in my opinion, the bash maintainer has done
everything possible to document this.
I did the required changes for you, please substitute the paragraph that
sets $PS1 in your /etc/profile with the following to fix this
misconfiguration and thus make multiple lines in bash work again:
if [ "$PS1" ]; then
if [ "$BASH" ]; then
#PS1='\u@\h:\w\$ '
PS1="\[\033[01;31m\]\u@\h:\w\$ \[\033[0m\]"
else
if [ "`id -u`" -eq 0 ]; then
#PS1='# '
PS1="\[\033[01;31m\]# \[\033[0m\]"
else
#PS1='$ '
PS1="\[\033[01;31m\]$ \[\033[0m\]"
fi
fi
fi
I hope you are satisfied with this answer and I'm closing this bug now.
Regards,
Carsten
More information about the Virtual-pkg-base-maintainers
mailing list