Zsh Mailing List Archive
Messages sorted by:
Re: Shell sourced function not available to executed script
- X-seq: zsh-users 22822
- From: Clint Priest <cpriest@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Shell sourced function not available to executed script
- Date: Sun, 13 Aug 2017 20:18:12 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=vDd+ox3JtJksisNlGu BDXrWaFdCnWXJhah0uTmlVa1g=; b=UNTlVA8ewn1yhXWYFZ5iMlq2vnGV4mDn8a +Nuc43xWxP7mTeNcfrXSiugnp3fMavRGE2QM3TPLzlQq1H3j0HPPDKNn4T3nm828 2wyyTmg5seuBHN9VeMnwbDxLCbapvUa9NqbgZK9wkGKNhejHFRUlcUKAygoOiIlc Yj8R2NtjMDz4Vga3nFbU4ibfqMWhnDZKgUv0F30XG6qPSNzq63Z+tzjD59ckUdeC Z0WHkln9vqZYNb36+sQUM5BYFoLvZfenlhDehfUhkPuOuHeeyVdQgk2uvlzz+d+9 9bAA6uKqGbgsuJVFY/j9ZNOKuk0qlKCHYKVWpmni9+1yJbrdyVaQ==
- In-reply-to: <CAH+w=7ZZk2EPRbs7X4XVAqPZF31oYuFcTkZ_rjooxiiPqHZjQw@mail.gmail.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <email@example.com> <firstname.lastname@example.org> <CAH+w=7ZZk2EPRbs7X4XVAqPZF31oYuFcTkZ_rjooxiiPqHZjQw@mail.gmail.com>
On 8/13/2017 6:57 PM, Bart Schaefer wrote:
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).
Makes sense, I'm not sure but I don't think bash behaves in this way.
No matter, I can follow this pattern as well, thank you.
Messages sorted by: