-
Notifications
You must be signed in to change notification settings - Fork 1
[Merged by Bors] - Support generation of shell completions #54
Conversation
If you have any installation instructions for your shell (in addition to c97f6ac) please paste them here and i will add them to the docs. |
I tried it with the fish shell. The command and option names are auto-completed but the values are not. I would have expected that at least the static option values can be completed like It would be great if also the dynamic option values would work. The auto-completion in kubectl is tremendously helpful with that:
|
Thanks for your review! |
66dec98
to
85d9e40
Compare
85d9e40
to
fbfd461
Compare
The funcitonality in this PR is fine for now, we'll open a follow up ticket for the more fully fledged functionality that also completes release names etc. |
@siegfriedweber with @soenkeliebau's comments in mind: could you please review the PR again? The --log-level option should work now |
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.
The auto-completion generated by clap adds some value but depending on the used shell, the value is limited. For instance, in the fish shell the auto-completion stops working after the first option (stackablectl -l info -
). The workaround is to discard the spaces on short options (stackablectl -linfo -
) but this does not work for long options like --additional-release-files
. However, this works in bash.
Thx! |
bors r+ |
Pull request successfully merged into main. Build succeeded: |
Description
For #37
This was surprisingly easy. Following the same semantics as
kubectl
.Docs will be added via c97f6ac in #36.
We can copy parts of
kubectl
docsYou can try it out with
source <(stackablectl completion bash)
(for bash)Review Checklist
Once the review is done, comment
bors r+
(orbors merge
) to merge. Further information