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

So ${foo-bar} will not expand to bar if foo exists, but is empty. The empty value will prevail. ${foo:-bar} will expand to bar.

If we have nothing in place of bar, they are effectively same.



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

Search: