From: Clint Priest <cpriest@zsh-users.rxv.me>
To: Zsh Users <zsh-users@zsh.org>
Subject: Shell sourced function not available to executed script
Date: Sun, 13 Aug 2017 18:02:25 -0500 [thread overview]
Message-ID: <75edf819-b9c7-4466-978b-14331314e92a@zsh-users.rxv.me> (raw)
I could be wrong, but I swear that a function declared in my shell
environment was available to another script executed from the CLI.
In my case, I have a function:
pv() {
echo "\$$1='${(P)1}'";
}
Which is `source`ed into my environment. I could type pv PATH and it
would echo:
$PATH='...'
However when I run another script with executability set, shebang is
#!/bin/zsh it tells me pv is not available.
Any ideas?
--
-Clint
next reply other threads:[~2017-08-13 23:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 23:02 Clint Priest [this message]
2017-08-13 23:15 ` Clint Priest
2017-08-13 23:57 ` Bart Schaefer
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=75edf819-b9c7-4466-978b-14331314e92a@zsh-users.rxv.me \
--to=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).