3 ms·
Shell has its place as a glue language between commands. I tried writing a good CLI in bash this week and yikes it was hard. The lack of a package manager and g
by joshlk 4y ago
Shell has its place as a glue language between commands. I tried writing a good CLI in bash this week and yikes it was hard. The lack of a package manager and good libraries really hurt. If you could “pip” install bash libraries like an argparse equivalent it would help a lot
- abathur 4y agohttps://t-ravis.com/post/shell/no_look_no_leap_shell_with_nix/ https://t-ravis.com/post/shell/no_look_no_leap_shell_with_ni... (but of course, that's it's own portability/bootstrapping problem if you need genuine internet-rando-level portability)
- abathur 4y agoThe 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+comity+path%3A**%2Fshellswain.bash+OR+language%3Anix&type=code 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+path%3A**%2Fcomity.*&type=code 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.events/ https://t-ravis.com/post/shell/neighborly_shell_with_bashup....