Bash 4 introduced a new environment variable called
PROMPT_DIRTRIM that allows
the shortening of paths displayed in its prompts (via
PS1. I added
~/.bashrc and whereas Bash used to display this prompt:
It now displays
[[email protected] .../generic/system/framework]$
which is a huge improvement especially when working with deep directory structures.