Fish-like path abbreviation in Bash
A Bash function that automatically abbreviates your PWD when it gets too long, the same way that the fish shell does. For example
A/B/C/D/Echo. To use this function, put it in your PS1 where you'd normally put
\w but surround it in backticks, so it should look something like this:
export PS1="`better_path` $"