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

Eric Cook <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
On 8/17/26 7:36 PM, Vincent Lefevre wrote:
> On 2026-08-17 15:56:23 -0400, Eric Cook wrote:
>> 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.
> 
> In the present case, I agree. But imagine that someone who doesn't
> know anything about zsh uses FPATH as an environment variable for
> their own use. This would break zsh scripts that use functions, like

Sure, but that isn't unique to zsh or any unix command though.

> Or do you assume that FPATH should universally be known?
> 

That isn't an assumption i would assert with my experience.

Nor does it justify the breaking of long standing use cases like mine that

FPATH=$FPATH zsh -f

to enter in a debugging session without needing to reconstruct FPATH.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.