[Bug 545152] New: default bash prompt on console is awkward
http://bugzilla.novell.com/show_bug.cgi?id=545152 Summary: default bash prompt on console is awkward Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: matthias.peinhardt@googlemail.com QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.14) Gecko/2009090900 SUSE/3.0.14-0.1.2 Firefox/3.0.14 The default bash prompt is \033[1m$(ppwd \l)\u@\h:\w>\033[0m. Looking at /etc/bash.bashrc reveals the function definition: ppwd () { local _t="$1" _w _x _u="$USER" _h="$HOST" test -n "$_t" || return test "${_t#tty}" = $_t && _t=pts/$_t test -O /dev/$_t || return _w="$(dirs +0)" _x=$((${#_w}-18)) test ${#_w} -le 18 || _w="...${_w#$(printf "%.*s" $_x "$_w")}" printf "\e]2;%s@%s:%s\007\e]1;%s\007" "$_u" "$_h" "$_w" "$_h" > /dev/$_t } This causes three problems: - on an ordinary console (Ctrl-Alt-F1) the printf above is executed; it shows the hostname twice. - moreover, the rest of PS1 is shown also, so a lot of redundant information is shown. - \007 in the printf produces a beep, I guess. That is annoying. Finally, please consider to enable the path shortening that is provided by ppwd() for _every_ prompt. Reproducible: Always Steps to Reproduce: 1. Switch to fresh console (Ctrl-Alt-F1, say) 2. Login as normal user. 3. Stare at the bash prompt. 4. Press Enter to hear the annoying beep. Actual Results: a nasty prompt is shown, and the computer beeps at every command. Expected Results: a normal prompt should be shown, and computer shall not beep. Severity: minor for any other distribution, almost critical for opensuse ;-) -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=545152
zhu rensheng
http://bugzilla.novell.com/show_bug.cgi?id=545152
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c1
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=545152
User matthias.peinhardt@googlemail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c2
Matthias Peinhardt
http://bugzilla.novell.com/show_bug.cgi?id=545152
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c3
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=545152
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c4
--- Comment #4 from Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=545152
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c5
--- Comment #5 from Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=545152
User matthias.peinhardt@googlemail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c6
Matthias Peinhardt
http://bugzilla.novell.com/show_bug.cgi?id=545152
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c7
Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=545152
User matthias.peinhardt@googlemail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=545152#c8
Matthias Peinhardt
participants (1)
-
bugzilla_noreply@novell.com