Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: broken by the FPATH environment variable defined by bash / lmod



On 8/17/26 9:17 AM, Vincent Lefevre wrote:
This is possibly due to /usr/share/lmod/8.7.60/init/bash from the
lmod package, as mentioned at

if bash learned about FPATH and autoloadable functions, then like other shell variables,
it shouldn't be exported (without good reason) and that file is the problem.

It appears that instead of ignoring the $FPATH environment variable
on startup, zsh sets $fpath to $FPATH.

Note that the zshparam(1) man page says: "Some environment variables
are not imported for reasons of security or because they would
interfere with the correct operation of other shell features.",
which should be the case here.


Not doing so would break current users expectations like mine,
and differ from ksh, where FPATH comes from.

There are other parameters that are imported from the environment and used
that users of other shells may mistakenly export like PS1. Not importing
that parameter would also break users expectations.




Messages sorted by: Reverse Date, Date, Thread, Author