Browse Source

Add bash completion for `--profile`

Signed-off-by: Harald Albers <[email protected]>
Harald Albers 4 years ago
parent
commit
4e382b9c28
1 changed files with 6 additions and 1 deletions
  1. 6 1
      contrib/completion/bash/docker-compose

+ 6 - 1
contrib/completion/bash/docker-compose

@@ -172,6 +172,10 @@ _docker_compose_docker_compose() {
 			COMPREPLY=( $( compgen -W "debug info warning error critical" -- "$cur" ) )
 			return
 			;;
+		--profile)
+			COMPREPLY=( $( compgen -W "$(__docker_compose_q config --profiles)" -- "$cur" ) )
+			return
+			;;
 		--project-directory)
 			_filedir -d
 			return
@@ -618,10 +622,11 @@ _docker_compose() {
 		--tlskey
 	"
 
-	# These options are require special treatment when searching the command.
+	# These options require special treatment when searching the command.
 	local top_level_options_with_args="
 		--ansi
 		--log-level
+		--profile
 	"
 
 	COMPREPLY=()