> Thanks for the response! It's always fun trying to figure out what POSIX
> means. I'm sure there's people who probably rely on the consequences of an
> altered PATH, too, so i don't expect you can make anyone happy whatever
> happens here. (I would guess that a "reasonable" compromise might be to at
> least change the behaviour under 'bash --posix' or bash as /bin/sh, though
> that wouldn't help in the particular case affecting my script.
This turned out to be a little more involved than I thought, but I changed
things so that command -p won't change the $PATH. If you want to have a
command-specific version of $PATH, you can use the temporary environment
for that, but there's no way to use command -p without modifying $PATH in
bash-4.3 and previous versions.
This uncovered a bug, too: if you use command -p with a temporary environment
assignment to PATH, that tempenv assignment is what persists after the
command completes. My changes fix that also.
This will be in the next release of bash.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/