I am working in a lot of projects lately that have a folder structure like:
But I really want it to look like this since I am often in many projects at once:
<Project Name>/main $
So I created a little bash function to do this in place of \W:
Once you have that in place, all you have to do to add it to your bash prompt is export PS1 like so:
export PS1="\$(parent_dir) $ "
Add the function and the export to your ~/.bashrc file and you will have a more useful prompt!
I hope this helps someone else, too!