Re: Feature request: Add "import" built-in.
-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, CWRUc...@case.eduhttp://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-
Re: Final backslash causes array assignment mis-parse in previous eval
On 8/25/14, 6:25 PM, jim.av...@gmail.com wrote: > Bash Version: 4.3 > Patch Level: 0 > Release Status: release > > Description: > NOTE: This repeats (approximately) a bug I sent a few minutes ago, but > with > an invalid From: address. Most likely my ISP dropped the message as > spam, > but if not, please accept my appoligies for the dup. > > \ is supposed to be effectively ignored, but if it appears at > the > end of the script then parse errors sometimes occur with previous > statements. > In particular eval "array=(values...)" is mis-parsed if a subsequent > statement > ends with and there is nothing further in the script. Thanks for the report. This will be fixed in the next release of bash. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/