Re: broken by the FPATH environment variable defined by bash / lmod
Vincent Lefevre <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <[email protected]> |
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 ---------------------------------------- #!/usr/bin/env zsh autoload -U is-at-least is-at-least 5 && echo OK ---------------------------------------- $ export FPATH=foo $ ./some-script is-at-least:4: is-at-least: function definition file not found Or do you assume that FPATH should universally be known? -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)