On Wed, Oct 15, 2014 at 08:50:25AM -0700, Eduardo A. Bustamante López wrote: > On Wed, Oct 15, 2014 at 03:38:01PM +0200, lorenz.bucher....@rohde-schwarz.com > wrote: > > variables with suffix "%%" can't be set/exported. > > This makes problems restoring environments which where saved by external > > programs like printenv (see example below) > > I'm not sure if this is a bug, because I doubt that function > exporting was intended to use that way. Just source a file with the > function definitions...
My take was that he's got some script that does an environment save/restore and the function exports broke it. He may not especially care about restoring the functions, as long as they don't get in the way of the real variables. That said, his save/restore technique is going to break on *any* environment variable that isn't a valid shell variable name, which includes a much larger set of things than just BASH_FUNC_foo%%. He simply hasn't encountered any of these other things yet (and may never encounter them in real life, depending on his environment).