Current Behavior
CLI users enjoy and benefit from less typing when they have enabled autocompletion for a command line interface. mesheryctl does not currently provide a completion command from which the full set of mesheryctl commands may be sourced for the user's specific type of shell (bash or zsh).
Desired Behavior
Leveraging Cobra's generator, create a new completion command is created with the following parameters and flags:
mesheryctl completion SHELL - Generates autocompletion script for the specified shell (bash or zsh)
meshery completion --help
Generate autocompletion script for Meshery for the specified shell (bash or zsh).
This command can generate shell autocompletions. e.g.
$ mesheryctl completion bash
Can be sourced as such
$ source <(mesheryctl completion bash)
Usage:
mesheryctl completion SHELL [flags]
Flags:
-h, --help help for completion
kubectl's docs as an example - https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion@leecalcote I could take up this one if that's okay
This one has your name all over it, @mayankshah1607. ;)
This is the enhancement you were talking about @nitishm, right?
Yessir
Hi @WLun001, we would love to have your help here. Given your experience with autocomplete (and fish shell) will you consider taking on this issue?
@leecalcote I can try out probably sometimes in this week or next week
@WLun001, that would be fantastic. 馃槃