bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: Add "import" built-in.


From: Chet Ramey
Subject: Re: Feature request: Add "import" built-in.
Date: Tue, 26 Aug 2014 11:22:58 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

-----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, as
> possible.
> 
> What I am missing is the "import" built-in that passes only the
> explicitly given arguments from the importing to the imported Bash script.

It seems like this functionality would be best provided using an option
to source/dot or (less desirably) a global flag.  I will put it on the list
of potential features for the next version.

Chet

- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlP8plEACgkQu1hp8GTqdKu0vwCfaFef/XZLN2BPyfXGLRJ0EUA8
+xcAn2RxegEYDxEfEzZzf1+xOT+QdUdQ
=s4Hs
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]