[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Have var+func sourced in a subroutine but they don't seem to end up
Re: Have var+func sourced in a subroutine but they don't seem to end up in same scope
Mon, 29 Jul 2019 19:25:54 +0300
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
On 29.7. 09:25, L A Walsh wrote:
The library-include function allows me to source a library file
that is in a relative path off of PATH (a feature not in bash,
I tried putting exporting the data and the function with export
but it ended up the same. The variables weren't defined in the
same scope as the function.
Are you sourcing some other script, or running it as a regular program?
Because above, you say 'source', which would indicate running code from
another file in the same shell, but then you talk about exporting, which
really only matters when starting a new process (as far as I know).
An example that would actually run and demonstrate the issue might make
it easier to see what's actually going on.
Ilkka Virta / address@hidden