Fix bash completion for `config --hash`

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2018-09-27 08:46:37 +02:00
parent c17274d014
commit b29ffb49e9
1 changed files with 12 additions and 1 deletions

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" ) )
}