.bash_profile PS1 to display the current directory folder and osx $ MAC

In my .bash_profile I have now

PS1="$ " 

which in my terminal returns '$'

I also want to show the current folder.

if I run the command pwd / Users / Me / Sites /

I would like my bash invitation to return "Sites $

Thank you for your help.

+7
bash
source share
1 answer

try the following:

 PS1='\[\033[01;32m\]\ u@ \h\[\033[01;34m\] [\w]\[\033[00m\]' 
+10
source share

All Articles