Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: broken by the FPATH environment variable defined by bash / lmod
- X-seq: zsh-workers 55100
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: broken by the FPATH environment variable defined by bash / lmod
- Date: Tue, 18 Aug 2026 23:03:46 +0200
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KjPxtflWlA4FI2Wkk9Kf5UZeCo/eZl2QgD1dIe/wZ6s=; fh=SbTlPuNNxBzTkRlwWtqw/TXBY0HvGvtE97RpPp3sJPM=; b=DkwIarRpcQjvn9tcZ+G2jXvPPMvDU5V2gVWQ39/r/7fjInEni+wsA1hnR+EJ79p9zv 7G+bguCcG3A0/ASEwGkZrNMOdosFW6XHG1WBacJMUVkzMKcQsKalMg0ZIfK90iPS+QCR rM6RjX5O5BYnMh2CZltLMMjfg+7X6dk8At12i/G2vzPHXhcMZC+BqSCJyp+Yj47durCZ PHNBxrjDk4lqtWPWfs5iVrYhYiZ5oBdi3rcoW4IdjgjX460V75SRzV5BuGWDxaWGmW1Y MkvsZLP5e1Z3UZ9IgRhADCy4oHkuI2khcoU5hnlZz6B6j2Xj3DhrRxYx8UoWMYg+g9d5 CV6A==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1787087039; cv=none; d=google.com; s=arc-20260327; b=g760N+yd6IpN4aeUiSYkXENKGGHfHODgvpKlnCrSVjlQchj+kD86VA04hw9tXKjq/Y wgk80Mjf5Q96Lz1S3aMUuM1q+Ws3df2c7gPZnnKHB6HNcGiDQm9daA7Eqq3HozQS5aK0 so8Vnrf3fFwol8T2epYnmrcsnOE7COJtouz+7o14xy3G1C0Poo44DlQGuviVwETgzE5l DGjPq/pNwrOJEWRzysdiuNEkfvc9PIF10txHje4Y9hBSljVwdhfCHWmTM90KFtM/Q6nC HaCY6k6ilE9XtOFKUMSQAWLMsb63yMLIXd5LQgC+Cwrenb2nbTwCs6bL1fFOsY4KopPc EFYw==
- Archived-at: <https://zsh.org/workers/55100>
- In-reply-to: <20260817233629.GA2170281@qaa.vinc17.org>
- List-id: <zsh-workers.zsh.org>
- References: <20260817131711.GA2090502@qaa.vinc17.org> <c5d31828-c4e4-4cec-ac0b-bdce9ea36e36@gmx.com> <20260817233629.GA2170281@qaa.vinc17.org>
On Tue, Aug 18, 2026 at 1:36 AM Vincent Lefevre <vincent@xxxxxxxxxx> 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
>
> ----------------------------------------
> #!/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?
https://lmod.readthedocs.io/en/latest/search.html?q=FPATH
It seems it is at least known by the software in question, though the
answer in the FAQ is pretty confusing, claiming it supports zsh and
then telling you to unset FPATH manually.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author