I have a similar aversion to very long command prompts, but I still want to have a hint as to what directory I am in, so I refine my prompt to be:
__cwd3() {
typeset start=${PWD/${HOME}/\~}
typeset delete=${start%/*/*/*}
typeset partial=${start#${delete}/}
if [[ "${partial}" != /* && "${partial}" != \~* ]]
then
partial="/.../${partial}"
fi
echo "${partial}"
}
PS1="\![\h]\$(__cwd3)> "
Where both the __cwd3() function and the PS1 definitions are in my bash shell initialization file.
__cwd3() only displays the last 3 subdirectories of your current working directory. If the path is relative to your home directory, /Users/username is replaced with ~ before removing any excess leading directories. If any leading directories are deleted, then /.../ is prepended.
\$(__cwd3) is dynamically executed each time your PS1 prompt is displayed, so the path information is always up-to-date.