-
Notifications
You must be signed in to change notification settings - Fork 2k
enhancement(cli): Shell autocompletion for vector cli #24414
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
base: master
Are you sure you want to change the base?
Conversation
This adds support for generating autocompletion for different shells for the vector cli. Superseds [vectordotdev#9823](vectordotdev#9823)
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
thomasqueirozb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! This will be a nice addition
| GenerateSchema(generate_schema::Opts), | ||
|
|
||
| /// Generate shell completion, then exit. | ||
| #[command(hide = true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason to hide this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually you dont make shell completions at runtime, but rather at comp/ install time. Thus, the user will not need this information. That is why completions are often generated via cargo xtasks.
This adds support for generating autocompletion for different shells for the vector cli.
Superseds #9823
Summary
We are a subcommand to generate autocompletion for the vector cli.
Vector configuration
How did you test this PR?
I have tested the completion for zsh extensivly as well as generated the completion for the other shells available.
Change Type
Is this a breaking change?
Does this PR include user facing changes?
Possibly this should be used in packaging of vector
no-changeloglabel to this PR.References
Related: #9823
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details here.