4 ms·
Flipping back between ~2: - A tool for resolving external executables and sourceables in Shell scripts to absolute paths (and erroring when they aren't found).
by abathur 4y ago
Flipping back between ~2:
- A tool for resolving external executables and sourceables in Shell scripts to absolute paths (and erroring when they aren't found). This is mainly to make it possible to package Shell with Nix in a way that they don't depend on all of their dependencies being in the environment.
The top level of this is ~easy enough, but identifying executables in the arguments to other commands is significantly harder. So, much of the focus is on triaging executables to flag those most likely to exec, coming up with human/automated processes for triaging the source of those executables to confirm, finding a good way to express complex nonstandard CLI syntax for parsing (in a way that's humane enough to be maintainable and ~contributable), etc.
- A toolchain for single-sourcing documentation in order to generate idiomatic markup for multiple output languages with different whitespace semantics. Because it's really hard to get good idiomatic format conversions out of largely presentational source such as markdown, this includes a flexible language with DIY semantics.
The entire toolchain does something a bit like what you'd try to accomplish with j2cli, some yaml, some jinja templates (and probably some python plugins, if you're trying to do anything complex) with more precise whitespace control. Still very rough/early, but glad I finally bit the bullet and started on it.