[Bug 1239205] Re: bashrc: Please add newline to default PS1 bash prompt
Rodney Beede
1239205 at bugs.launchpad.net
Wed Feb 5 20:24:11 UTC 2014
** Changed in: bash (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1239205
Title:
bashrc: Please add newline to default PS1 bash prompt
Status in “bash” package in Ubuntu:
Invalid
Bug description:
This is more an enhancement request than a "bug" report, but it's not
a question either :)
This is from the vanilla bashrc on my Lubuntu Saucy beta: (bash
v4.2-5ubuntu3)
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
which aroused the following problem: when cat'ing a file, and a second one just afterwards, it was impossible to determine (when scrolling in e. g. xterm) where the one file ended and where the second file began.
Output was like this:
andy at somewhere:~$ cat silly0
foo
foo
bar
andy at somewhere:~$ cat silly1
bar
foo
foo
andy at somewhere:~$
Actually, it must be noted that each file were a few hundred lines
long, so scrolling was mandatory.
The result I'd like to get is:
andy at somewhere:~$ cat silly0
foo
foo
bar
andy at somewhere:~$ cat silly1
bar
foo
foo
andy at somewhere:~$
to let the different outputs "breathe" a little. This little amendment
to the default bash prompt improved a lot on my side, and reduced the
timely efforts of finding beginnings and endings of output.
Hence, the default line ought to be this:
if [ "$color_prompt" = yes ]; then
PS1='\n${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='\n${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
Please think of users totally new to Ubuntu or its remixes who have no
idea where to "fix" this. This should be default.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1239205/+subscriptions
More information about the foundations-bugs
mailing list