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

Re: Shell sourced function not available to executed script



On Sun, Aug 13, 2017 at 4:15 PM, Clint Priest <cpriest@xxxxxxxxxxxxxxxx> wrote:
> It would also seem that 'autoloaded functions' are also not available from
> executed scripts...  I created it as an autoloaded function and it works
> from the CLI just fine.
>
>
> On 8/13/2017 6:02 PM, Clint Priest wrote:
>>
>> In my case, I have a function:
>>
>> Which is `source`ed into my environment.

This is going to depend on which of your startup files contain the
"source" or "autoload" commands.  Interactive and login shells load a
different set of ~/.z* files than do scripts.  Scripts typically read
only /etc/zshenv and ~/.zshenv.  For complete details, "man zsh" and
read the section on "Startup/Shutdown Files" (or section 5.1 in "info
zsh" if you have that available).



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