3 ms·
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
by alkh 2y ago
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-L19C25 https://github.com/simonmysun/ell/blob/main/ell.sh#L19C1-L19...
- simonmysun 2y agoThanks! The colon is here to make sure the result is not executed. I learned that from here: https://stackoverflow.com/a/28085062/2485717 https://stackoverflow.com/a/28085062/2485717
- pseufaux 2y agoThe : 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.