-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 8/24/14, 7:36 AM, Tim Friske wrote:
> Hi,
>
> as I see it the "source" built-in is perfect for embedding a sourced
> Bash script into the sourcing one while preserving as much of the
> environment, specifically the positional and special parameters
On Mon, Aug 25, 2014 at 11:10:31PM +0800, lolilolicon wrote:
> On Mon, Aug 25, 2014 at 8:04 PM, Greg Wooledge wrote:
> > On Sun, Aug 24, 2014 at 01:36:38PM +0200, Tim Friske wrote:
> >> I currently emulate the behavior I seek for with the following function:
> >>
> >> function _import {
> >> loc
On Mon, Aug 25, 2014 at 8:04 PM, Greg Wooledge wrote:
> On Sun, Aug 24, 2014 at 01:36:38PM +0200, Tim Friske wrote:
>> I currently emulate the behavior I seek for with the following function:
>>
>> function _import {
>> local -r file="$1"
>> set -- "${@:2}"
>> source "$file" "$@"
>> }
>
> Ho
On Sun, Aug 24, 2014 at 01:36:38PM +0200, Tim Friske wrote:
> I currently emulate the behavior I seek for with the following function:
>
> function _import {
> local -r file="$1"
> set -- "${@:2}"
> source "$file" "$@"
> }
How is this different from source, exactly? You're passing all of t
Tim Friske writes:
> set -- "${@:2}"
Aka shift.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Hi,
as I see it the "source" built-in is perfect for embedding a sourced
Bash script into the sourcing one while preserving as much of the
environment, specifically the positional and special parameters, as
possible.
What I am missing is the "import" built-in that passes only the
explicitly given