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

Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug



On Sep 30,  6:49am, Daniel Shahaf wrote:
}
} Would it work to declare FPATH as a private in the wrapper?  (Using
} zsh/param/private)
} 
} Sebastian said on IRC it wouldn't work but I don't see why.

It would work, but it doesn't help -- there's a three-stage process:

1. autoload wrapper creates stub function containing local FPATH
2. stub function runs using that FPATH to load the real function
3. real function runs and calls real autoload instead of wrapper

The problem Sebastian wants to address is, how to get *this* real
function to call the wrapper autoload *without* forcing all usages
of autoload to call the wrapper.



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