Hacker News new | past | comments | ask | show | jobs | submit login

Looks great! I work on a number of different machines, so having something lightweight(like written in shell) is always desired.

Out of curiosity, can someone explain to me why certain commands start with a colon? Like : "${ELL_LOG_LEVEL:=2}";[1] I thought it was useful only as a no-op? [1]: https://github.com/simonmysun/ell/blob/main/ell.sh#L19C1-L19...




The : basically just tells bash to do nothing with the result of the line. So `: "${ELL_LOG_LEVEL:=2}";` would initialize `ELL_LOG_LEVEL` to 2 if it's not already set without producing any output.


Thanks!

The colon is here to make sure the result is not executed. I learned that from here: https://stackoverflow.com/a/28085062/2485717




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: