Just to give one example: The topic of errexit aka `set -e`.
In the beginning, I thought it should be an easy decision and since programs are supposed to be reliable, they should terminate in case of an error. So I added `set -e` to all my scripts. However, later I learned, that if you call a function from within a condition, the function is executed without `set -e` even if the function itself sets the option. Since then, I am unsure if it is better to have a function that 'sometimes exits' when it comes across an error or 'never exists' when it comes across an error, because 'always exists' when it comes across an error does not exist.
It is still a work-in-progress project and the documentation on the website is not up-to-date, but I think we are working on the same problem ;-)
If you want to run probably all the code I have written, you can run the test-suite like:
curl -fsL https://mdl.sh/development/tools/run-all-tests/run-all-tests-0.9.16.sh | sh
A total run-time of 8 Minutes is normal and there is little output in the beginning.The code is available on Github[2].
[1]: https://module.sh
Also, code without comments and documentation is useless, because developer must invest some time into browsing and understanding of your code first, but, often, it faster to rewrite code from scratch instead.
Also, you forget to include a license for your code, so nobody can use your code for any purpose.
I like the idea of downloading of modules at demand, with verification of integrity. I'm looking to implement something like that for my project too, but I'm afraid that I will not be able to implement it securely enough.
Yes, there are certainly some modules which lack comments. On the other hand, there is at least one module which has its own readme to explain the code:
https://github.com/arendtio/mdl.sh/tree/master/development/d...
Regarding the security: As said, I am targeting POSIX and as far as I know, the only checksum tool available is cksum. This is borderline insecure but catches transmission errors at least. However, if you do not have such strict requirements you can easily use something like sha256sum. In fact, my module allows to use alternative checksum tools but uses cksum if nothing else is specified (because it is better than nothing and always available).
And lots of people use Nix - and write a lot of bash.