How to get from this prompt
~/this/is/a-very-very-long-directory-name/dir
to this
~/this/is/a-ver...name/dir
in a bash prompt?
So shorten directory names longer than nn (20+) characters to something like xxxx...xxxx
note for possible duplicate: I want to shorten a long dir name, not a long path/to/dir