Skip to content

Add completion for bash & zsh#6

Open
tyler71 wants to merge 1 commit intoawkspace:masterfrom
tyler71:completion-branch
Open

Add completion for bash & zsh#6
tyler71 wants to merge 1 commit intoawkspace:masterfrom
tyler71:completion-branch

Conversation

@tyler71
Copy link
Copy Markdown
Contributor

@tyler71 tyler71 commented Sep 28, 2020

Created to address #5

I changed the install shell to bash to be able to do if checks with multiple comparisons. I'm not sure this is possible in sh

For a completion script to be installed, a few conditions need to be met:

  • The shell should be installed
  • docker installed and the user part of the docker group

Additional message for zsh users to include bashcompinit

zsh version has autocompletion, bash will simply list all existing images.

The bash completions script is added to /etc/bash_completion.d/dockit
zsh is added to /usr/share/zsh/vendor-completions/_dockit


I've tested both in the ubuntu image and they seem to be working well.
Bash needs bash-completion installed and zsh needs bashcompinit in ~/.zshrc.
Make sure if testing to switch to a non-root user.

For a completion script to be installed, a few conditions need to be met
* The shell should be installed
* docker installed and the user part of the docker group

Additional message for zsh users to include bashcompinit

zsh version has autocompletion, bash will simply list all existing images.
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.

1 participant