coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

Should `clap_complete` be part of the multicall binary?

Open tertsdiepraam opened this issue 2 years ago • 1 comments

Prompted by a comment on Reddit by epage, I think we should try to not depend on clap_complete at runtime or at least make it optional. The simplest thing to do is to hide it behind a feature flag. But we could also generate completions at compile time or create a separate binary that can generate the completions.

If you know how other projects do this or have an idea on how to improve this, feel free to comment below!

tertsdiepraam avatar Feb 11 '23 08:02 tertsdiepraam

bat and ripgrep seem to just generate the completions at compile time and put them somewhere in the target directory. Seems like a good solution.

tertsdiepraam avatar Feb 11 '23 09:02 tertsdiepraam