Reputation: 7327
In my .bash_profile I currently have
PS1="$ "
which in my terminal returns '$ '
I want to show the current folder as well.
if I run the command, pwd /Users/Me/Sites/
I would want my bash prompt to return 'Sites$'
Thanks for all your help.
Upvotes: 14
Views: 17359
Reputation: 6429
Note that if you don't want brackets or colors surrounding the current directory, you can use the simpler:
export PS1="\W$ "
Upvotes: 7
Reputation: 708
try this:
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]'
Upvotes: 21