Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bash and PS1 variables /w and /W
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
justinCOD
n00b
n00b


Joined: 08 Mar 2004
Posts: 73

PostPosted: Mon Jun 13, 2005 5:33 pm    Post subject: Bash and PS1 variables /w and /W Reply with quote

In older versions of bash (2.x) if you used the /W variable for PS1 it did not abbreviate your home directory with a tilde when you were in it. Now w/ the 3.x version of bash I get a tilde at my command prompt when using either /W or /w. Here is how it looks now w/ the newer bash version:

Code:
username@hostname ~ $ pwd
/home/username


Here is how I want it to look and how it looked on earlier bash versions, using /W in my PS1:

Code:

username@hostname username $ pwd
/home/username


Anyone know if it's possible to get it to not abbreviate home directory as ~ on your PS1 prompt? The new man page says this explicity where the old man page did not. However, in the new bash version it treats /W and /w the same it appears in regards to how it shows your home directory on the prompt.

Thanks for any help.
Back to top
View user's profile Send private message
sheldonh
n00b
n00b


Joined: 14 Sep 2004
Posts: 59

PostPosted: Mon Jun 13, 2005 5:51 pm    Post subject: Reply with quote

The interpretation of \w and \W have changed in bash3. You'll see the new interpretation clearly documented in the manual page.

I know this doesn't solve the problem for you, but at least you know you're not going mad. :-)
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7693
Location: Pelotas, BR

PostPosted: Mon Jun 13, 2005 6:15 pm    Post subject: Reply with quote

Seems to be a dup of this thread.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum