Просмотр исходного кода

Add docker-compose exec -u to docs and completion

Signed-off-by: Harald Albers <[email protected]>
Harald Albers 8 лет назад
Родитель
Сommit
50437bd6ea

+ 1 - 1
compose/cli/main.py

@@ -391,7 +391,7 @@ class TopLevelCommand(object):
         Options:
             -d                Detached mode: Run command in the background.
             --privileged      Give extended privileges to the process.
-            --user USER       Run the command as this user.
+            -u, --user USER   Run the command as this user.
             -T                Disable pseudo-tty allocation. By default `docker-compose exec`
                               allocates a TTY.
             --index=index     index of the container if there are multiple

+ 2 - 2
contrib/completion/bash/docker-compose

@@ -224,14 +224,14 @@ _docker_compose_events() {
 
 _docker_compose_exec() {
 	case "$prev" in
-		--index|--user)
+		--index|--user|-u)
 			return
 			;;
 	esac
 
 	case "$cur" in
 		-*)
-			COMPREPLY=( $( compgen -W "-d --help --index --privileged -T --user" -- "$cur" ) )
+			COMPREPLY=( $( compgen -W "-d --help --index --privileged -T --user -u" -- "$cur" ) )
 			;;
 		*)
 			__docker_compose_services_running

+ 1 - 1
contrib/completion/zsh/_docker-compose

@@ -241,7 +241,7 @@ __docker-compose_subcommand() {
                 $opts_help \
                 '-d[Detached mode: Run command in the background.]' \
                 '--privileged[Give extended privileges to the process.]' \
-                '--user=[Run the command as this user.]:username:_users' \
+		'(-u --user)'{-u,--user=}'[Run the command as this user.]:username:_users' \
                 '-T[Disable pseudo-tty allocation. By default `docker-compose exec` allocates a TTY.]' \
                 '--index=[Index of the container if there are multiple instances of a service \[default: 1\]]:index: ' \
                 '(-):running services:__docker-compose_runningservices' \