Date:        Mon, 8 Jul 2019 05:26:07 +0200
    From:        Martijn Dekker <[email protected]>
    Message-ID:  <[email protected]>


  | IMHO, that's still not clear enough; this could be interpreted to say 
  | that it should be added to the environment if it is set at the time the 
  | 'export' command is run.

Maybe just "if set when a command is run"

I'm not sure a whole new paragraph is warranted for this (and don't
forget the possibility that the variable was set before being
exported -- which is actually the more usual case:
        foo=bar; export foo
as that's what worked in ancient shells before "export foo=bar"
was invented.

  | What shell implementations actually do is add a 
  | variable whose name was previously given the export flag to the 
  | environment the moment it acquires a value, whenever that may be.

Yes.   Though I suspect that (at least some) shells construct the
environment every time one is needed (that's the only way to get the
current values of dynamic variables into the environment, if any of
those happen to be exported ... LINENO is the only one that exists in
POSIX but many shells have more).

kre

Reply via email to