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

FPATH non-bug (Re: `typeset -U' and exported tied parameters)



On May 10,  3:59pm, Bart Schaefer wrote:
} Subject: `typeset -U' and exported tied parameters
}
} This has something to do with the FPATH problem (11281 et al.), but I still
} don't know precisely what.
[...]
} Note that although `typeset -U' has changed both the array and the tied
} parameter, it has failed to update the exported copy of the tied parameter.

And that may very well, in fact, be the entire bug.  I now think the rest
was just pilot error on my part.

Unlike MODULE_PATH, which zsh never imports from the environment, FPATH
can be imported.  I didn't realize that; `autoload -U' was failing in an
older version of zsh that was found first in my $path, which I believed
was 3.1.6-whatever because the value of $fpath [which I assumed was the
same as that created in setupvals()] pointed at the newer functions.

The older version of zsh then changed fpath, which changed the exported
FPATH, which was then imported again when my .zprofile detected the old
zsh and exec'd the newer version.  At that point the xtrace output of the
two branches of the `if (autoload -U)' became indistinguishable[*], which
contributed to my delusion that the new zsh was taking the wrong branch.

[*] They wouldn't have been indistinguishable if I'd moved my setting of
PS4 into .zshenv, but like an idiot I avoided that because the new value
won't work in the older zsh.

So I apologize for bothering you all with my stupidity; at least maybe we
can get `typeset -U' fixed (it's broken in 3.0.7 as well, BTW).

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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