> IIUC then this code has two problems: first, it changes PATH and FPATH > for any _AS_DETECT_SUGGESTED shell snippets expanded right after this > one. Second, it uses an unsafe replacement path (this problem stems > from before your patch).
Oops, I remembered that each snippet expanded to a subshell, but that's only true of the entire suggested-tests. > I propose two alternative patches to fix these issues. Both, as the > code before the patch, assume that `test' is a built-in command. Yuck. > The first patch further assumes that, since `test' is not a special > built-in, the shell will take care to change the variables for the > duration of the following command only. Do we have reason to believe > this not to be portable? If it works on Solaris... Paolo