Prechádzať zdrojové kódy

Merge pull request #7818 from thomasleveil/completion-docker-build

Add --force-rm to docker build command completion
Tibor Vass 11 rokov pred
rodič
commit
782cde2c0f

+ 1 - 1
contrib/completion/bash/docker

@@ -151,7 +151,7 @@ _docker_build()
 
 
 	case "$cur" in
 	case "$cur" in
 		-*)
 		-*)
-			COMPREPLY=( $( compgen -W "-t --tag -q --quiet --no-cache --rm" -- "$cur" ) )
+			COMPREPLY=( $( compgen -W "-t --tag -q --quiet --no-cache --rm --force-rm" -- "$cur" ) )
 			;;
 			;;
 		*)
 		*)
 			local counter="$(__docker_pos_first_nonflag '-t|--tag')"
 			local counter="$(__docker_pos_first_nonflag '-t|--tag')"

+ 1 - 0
contrib/completion/fish/docker.fish

@@ -72,6 +72,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -a '(__fish_pri
 
 
 # build
 # build
 complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile'
 complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile'
+complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l force-rm -d 'Always remove intermediate containers, even after unsuccessful builds'
 complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l no-cache -d 'Do not use cache when building the image'
 complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l no-cache -d 'Do not use cache when building the image'
 complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s q -l quiet -d 'Suppress the verbose output generated by the containers'
 complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s q -l quiet -d 'Suppress the verbose output generated by the containers'
 complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l rm -d 'Remove intermediate containers after a successful build'
 complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l rm -d 'Remove intermediate containers after a successful build'

+ 1 - 0
contrib/completion/zsh/_docker

@@ -176,6 +176,7 @@ __docker_subcommand () {
             ;;
             ;;
         (build)
         (build)
             _arguments \
             _arguments \
+                '--force-rm[Always remove intermediate containers, even after unsuccessful builds]' \
                 '--no-cache[Do not use cache when building the image]' \
                 '--no-cache[Do not use cache when building the image]' \
                 '-q[Suppress verbose build output]' \
                 '-q[Suppress verbose build output]' \
                 '--rm[Remove intermediate containers after a successful build]' \
                 '--rm[Remove intermediate containers after a successful build]' \