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

Shell sourced function not available to executed script



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



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