Re: Strange bash prompt
I don't know if it's related or not, but when I do something like 'cd
/usr/local/../../var/log ; echo $PWD' I get '//var/log'
Bash 2.01.1(1)-release
On Wed, 22 Sep 1999, Keith Harbaugh wrote:
> On Wed, 1999-09-22 10:25:29 +0530, XRDLAB wrote:
> > Hi,
> >
> > I noticed a strange behaviour of bash regrding the prompt. I have set
> > PS1='\h:\w$ '. With that I get both the host name and the working
> > directory as my shell prompt. Yesterday I noticed a strange behaviour
> > accidentally. The sequence is given below:
> >
> > mysxrd:~$ cd /var
> > mysxrd:/var$ ---- prompt is correct
> > mysxrd:/var$ cd ../usr
> > mysxrd://usr$ ---- prompt has 2 slashes!
> >
> > I am surprised by this behaviour. Is it expected? The bash version is:
> > GNU bash, version 2.01.1(1)-release (i486-pc-linux-gnu)
> >
> > TIA,
> >
> > sridhar
>
> Here's your test run first with bash-2.03, then with bash-2.01:
> euler:~$ echo $PS1
> \h:\w$
> euler:~$ cd /var
> euler:/var$ cd ../usr
> euler:/usr$ echo $BASH_VERSION
> 2.03.0(1)-release
> euler:/usr$ ls -l /bin/bash*
> -rwxr-xr-x 1 root 1582874 May 12 06:37 /bin/bash
> -rwxr-xr-x 1 root 426980 Oct 20 1998 /bin/bash-2.01.1
> -rwxr-xr-x 1 root 1582874 May 12 06:37 /bin/bash-2.03.0
> euler:/usr$ /bin/bash-2.01.1
> bash-2.01.1-2.01$ PS1='\h:\w$ '
> euler:/usr$ cd
> euler:~$ echo $PS1
> \h:\w$
> euler:~$ cd /var
> euler:/var$ cd ../usr
> euler://usr$ echo $BASH_VERSION
> 2.01.1(1)-release
>
> The bash-2.01 was the slink release from debian;
> the bash-2.03 was built from sources obtained from ftp.gnu.org,
> using gcc-2.7.2.3 on a slink system.
>
> Keith
>
>
> --
> Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
>
Reply to: