Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it's fairly common.

  NO_COLOR=1
  NO_COLOR=true
  NO_COLOR=yes
Rather than parsing all the permutations, the usual evaluation of env vars that are expected to hold a boolean type is just the equivalent of:

  #ifdef NO_COLOR


Well, in ZSH [[ -v VAR ]] can actually differentiate between unset and null variables

And

NO_COLOR=

would lead to an non-intuitive behavior


I think the implication is that it should have a value.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: