> How hard is it to use clap_generate for our build? clap_generate is just a library, so it cannot be used directly (which is a shame!), which is why I have written a tiny wrapper in Rust (30 LoC). The wrapper takes precisely one argument (the yaml file) and generates the bash and zsh completions. So for clap_generate, I see the following options:
1) Maybe the wrapper could be brought upstream since it would be potentially useful to *any* non-Rust project which wants to generate shell completions. 2) Alternatively, the wrapper could be a project of its own, with the benefit of providing statically linked binaries in some registry, e.g. GitHub. 3) The wrapper could be stored in this repository, e.g. in a `contrib` directory. For the build process this means we would either have to compile the Rust source code (meaning we would pull in Rust as a new *build* dependency) or we would download the (statically linked) binary from GitHub (or some other place). > Or are there any alternatives that are packaged? Anything from python? I'm only aware of argcomplete [1] which is packaged for both Arch and Debian. However, I would argue that it is technically *inferior*: it does not generate proper zsh completions (instead relying on bashcompinit) but even worse, it seems that argcomplete is a *runtime* dependency. > Hmm, that is not that nice. We now have one file too much. If we go with the clap_generate approach, we could keep the generated files (it makes packaging much easier) but use CI to ensure that the yaml and generated files are in sync. Last but not least, we could drop the yaml files and from this point forward maintain the completion files directly :) [1] https://github.com/kislyuk/argcomplete -- Michael Adler Siemens AG T RDA IOT SES-DE Otto-Hahn-Ring 6 81739 München, Deutschland Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Jim Hagemann Snabe; Vorstand: Roland Busch, Vorsitzender; Klaus Helmrich, Cedrik Neike, Matthias Rebellius, Ralf P. Thomas, Judith Wiese; Sitz der Gesellschaft: Berlin und München, Deutschland; Registergericht: Berlin-Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE 23691322 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20211110153622.wqtfcqwomdn4yib2%40kratos.
