On Sun, May 28, 2017 at 09:35:30PM -0400, Samuel Lijin wrote: > > However, I think POSIX mandates the behavior you'd expect. And the only > > shell I know that misbehaves in this way is Solaris /bin/sh, which we > > have already declared too broken to support. > > Off-topic, but where is this explicitly documented? I couldn't find a place that mentioned it explicitly, but POSIX defines the concept as "the export attribute" of the variables. Which implies to me that the bit is tied to the variable itself, not its value. It also says that the flag is cleared when a variable is unset, so: foo=one export foo sh -c 'echo $foo should be one' unset foo foo=two sh -c 'echo $foo is not exported' That could potentially affect somebody writing a filter-branch snippet, but presumably if they are using "unset" they know what they're doing. -Peff