Skip to content
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

🚧 feat: autocompletion installer 🚧 #5048

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Benehiko
Copy link
Member

- What I did
Override the cobra completion command to add extra functionality such as automatically installing completions on the user machine. The behavior of the completion command should still generate cobra commands.

- How I did it
Added a completion cobra.Command onto the root command.

- How to verify it
Run docker completion --help

Some examples:

docker completion zsh --manual
mkdir -p .docker/completions && docker completion zsh > .docker/completions/_docker
cat <<EOT >> .zshrc
# The following lines have been added by Docker to enable Docker CLI completions.
fpath=(.docker/completions/_docker $fpath)
autoload -Uz compinit
compinit
EOT
# End of Docker Completions⏎ 

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

image

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant