Matthew Woehlke <mw_tr...@users.sourceforge.net> wrote: > Actually, a feature that would be REALLY helpful is a way to specify > certain directory strings that should be abbreviated.
PS1='...$(mypath)...' mypath() { case $PWD/ in /usr/local/src/kde/svn/trunk/*) printf %s "${PWD/#\/usr\/local\/src\/kde\/svn\/trunk/\$src\$}";; /usr/local/build/kde/svn/trunk/*) printf %s "${PWD/#\/usr\/local\/build\/kde\/svn\/trunk/\$build\$}";; *) printf %s "$PWD";; esac } paul