-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-generate completion files through clap #220
Comments
How would we feel about a I've noticed some other CLI apps I use do this, so just wanted to point it out as an additional option. |
While I see your point, I don't think it's worth the additional CLI option (which increases complexity) for a feature that is mostly relevant for packagers (not really for end users) and will only be used max once per installation. |
|
The way I see to do this involves creating a build.rs script described here. But I'm unsure of how to use this with our |
If I understand correctly, what you are proposing has already been tried in #256, which was closed because dynamic completion of pages did not work with the generated completions - or are you proposing something else? |
Oh I see, so we want it to complete the page lookups, and not just the flags, correct? How is this done currently? |
All three shells we support do support such dynamic completion. Currently, we write the completion files by hand and make use of the features (see usages of This is of course not optimal, because each completion needs to be kept up to date and in sync with each other - I just found a bug with the fish one (#268) |
Yeah, until clap supports such dynamic lookups, it's probably best to close this issue. |
Replace our manually-written completion files for bash, zsh and fish with auto-generated completion files.
Clap supports this through https://github.com/clap-rs/clap/tree/master/clap_generate.
These completion files don't need to be checked in, instead the release build script should generate them. Additionally, the README could contain a section on how to generate these completions (might be interesting for packagers).
The text was updated successfully, but these errors were encountered: