Merge pull request #4817 from albers/3205-exec-u

Add docker-compose exec -u to docs and completion
This commit is contained in:
Joffrey F 2017-05-22 12:23:30 -07:00 committed by GitHub
commit 5b6637d7f8
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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' \