> From: Eric Siegerman <[EMAIL PROTECTED]> > Date: Thu, 1 Aug 2002 13:46:05 -0400 > > Looks good, except that the leading "." to pacify zsh got lost > in the shuffle.
The zsh "." issue is still in there, though a bit terser. > > -$unset CDPATH || CDPATH=: > > +$unset CDPATH || CDPATH=$PATH_SEPARATOR > > That "." wasn't here even in the old version, but probably should be. It doesn't need to be, since 'unset' works with zsh. Come to think of it, does any shell support CDPATH but not 'unset'? If not, we can simply do "$unset CDPATH", both in the code and in the documentation. That would be nicer. > Seems to me that CDPATH's primary effect (messing with where "cd" > takes you) is just as undesirable as the side-effect under > discussion (verbosity), so both should be disabled. But unsetting CDPATH does both, right? > - Rather than trying to disable the verbosity in a highly > non-portable way, work around it in a portable (though ugly) > way: > abs=`cd $rel >/dev/null && pwd` That isn't portable either, since cd is ineffective in older shells when the cd's I/O is redirected. > Hmmm, time for a CANONICALIZE_PATHNAME macro? Maybe. It would have to have options, though: e.g., do you want logical or physical canonicalization? And what do you do if 'pwd' fails?