Something
public text v1 · immutable$ [ "$foo" != "bar" ] && echo true
true
$ export foo="bar"
$ [ "$foo" = "bar" ] && echo true
true
$ [ "" != "bar" ] && echo true
true
$ [ "$foo" != "bar" ] && echo true
true
$ export foo="bar"
$ [ "$foo" = "bar" ] && echo true
true
$ [ "" != "bar" ] && echo true
true