Matthew Woehlke wrote: > Actually, a feature that would be REALLY helpful is a way to specify > certain directory strings that should be abbreviated. For example, I > build KDE from sources, with source in /usr/local/src/kde/svn/trunk and > build objects in /var/local/build/kde/svn/trunk. It would be great if > bash could abbreviate these as, say, "$src$' and '$build$', > respectively. (That is, I would somehow tell bash that I want the > leading directory component "/foo/whatever/" abbreviated as "bar", where > both of those are arbitrary strings. As another example, abbreviate > "/net/remote2/corp/home3/" as "~" :-). Yes the slash should be stripped; > the idea being that "/net/remote2/corp/home3/dan" would become "~dan".)
You can already do something like this with parameter pattern substitution on $PS1, though it quickly becomes unwieldy. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/