Environments tested:
- macOS 12.4, M1 chip, zsh 5.8.1 (x86_64-apple-darwin21.0)
- Ubuntu 20.04.4, zsh 5.8 (x86_64-ubuntu-linux-gnu)
If I repeat 'export FOO' to mark an environment variable not give it a value, in bash it consistently does not show up in 'env':
$ export FOO
$ env | grep FOO
$ export FOO
$ env | grep FOO
but in zsh the 2nd invocation will set it to an empty string:
$ export FOO
$ env | grep FOO
$ export FOO $ env | grep FOO
FOO=
This is an issue only because a project I'm building uses an empty export for documentation, and it makes that project annoying to work with.