Merge pull request #6230 from albers/completion-services--hash

Fix bash completion for `config --hash`
This commit is contained in:
Joffrey F 2018-09-27 14:36:56 -07:00 committed by GitHub
commit 48a6f2132b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,18 @@ _docker_compose_bundle() {
_docker_compose_config() {
COMPREPLY=( $( compgen -W "--help --quiet -q --resolve-image-digests --services --volumes --hash" -- "$cur" ) )
case "$prev" in
--hash)
if [[ $cur == \\* ]] ; then
COMPREPLY=( '\*' )
else
COMPREPLY=( $(compgen -W "$(__docker_compose_services) \\\* " -- "$cur") )
fi
return
;;
esac
COMPREPLY=( $( compgen -W "--hash --help --quiet -q --resolve-image-digests --services --volumes" -- "$cur" ) )
}