Bash bug? Tilde display not working

melevittfl

Registered
Hi,

Does anyone why bash doesn't display the tilde '~' correctly in the prompt on Mac OS?

For example, when I first run Terminal, I get:
hostname:~ username $

Which is right, but then if I cd to another directory underneath $HOME, the prompt is changed to something like:
hostname:/Full/Path/to/home/directory/Library username $

Then, if I do: cd ~
The prompt is:
hostname:/Full/Path/to/home/directory username $

In other words, bash stops displaying the path with $HOME substituted with a '~'.

On Linux (and solaris) bash does the right thing. I.e, the second example would be: hostname: ~/Library username $

Any ideas?
 
Hmm. That's a new one on me. What do these commands report?

echo $SHELL
bash --version
echo $PS1

I've got bash 2.05b.0(1)-release, and my PS1 is "[\w] \u\$ ".
 
Welcome to Darwin!
mac:~ me$ echo $SHELL
/bin/bash
mac:~ me$ bash --version
GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin7.0)
Copyright (C) 2002 Free Software Foundation, Inc.
mac:~ mlevitt$ echo $PS1
\h:\w \u\$
mac:~ me$
 
Back
Top