uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.6k stars 1.27k forks source link

Should `clap_complete` be part of the multicall binary? #4343

Open tertsdiepraam opened 1 year ago

tertsdiepraam commented 1 year ago

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 commented 1 year ago

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.