zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Clint Priest <cpriest@zsh-users.rxv.me>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Shell sourced function not available to executed script
Date: Sun, 13 Aug 2017 16:57:57 -0700	[thread overview]
Message-ID: <CAH+w=7ZZk2EPRbs7X4XVAqPZF31oYuFcTkZ_rjooxiiPqHZjQw@mail.gmail.com> (raw)
In-Reply-To: <898c3100-52e8-9450-a816-4b029f807067@zsh-users.rxv.me>

On Sun, Aug 13, 2017 at 4:15 PM, Clint Priest <cpriest@zsh-users.rxv.me> 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).


  reply	other threads:[~2017-08-13 23:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-13 23:02 Clint Priest
2017-08-13 23:15 ` Clint Priest
2017-08-13 23:57   ` Bart Schaefer [this message]
2017-08-14  1:18     ` Clint Priest

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7ZZk2EPRbs7X4XVAqPZF31oYuFcTkZ_rjooxiiPqHZjQw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=cpriest@zsh-users.rxv.me \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).