The post I linked focuses on standalone executable dependencies, but the same concept applies to libraries.
If you want a quick example, you can look at how:
- shellswain depends on a little trap-namespacing library called comity: https://github.com/search?q=repo%3Aabathur%2Fshellswain+comi...
- comity in turn depends on a bash events library called bashup.events: https://github.com/search?q=repo%3Aabathur%2Fcomity+events+p...
Early last year I also wrote a little more generally about the idea of being able to finally build this shell code-sharing ecosystem in https://t-ravis.com/post/shell/neighborly_shell_with_bashup....