Add docker-compose exec -u to docs and completion

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2017-05-11 18:19:01 +02:00
parent 2c83c9ffb9
commit 16bbe5d99c
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -224,14 +224,14 @@ _docker_compose_events() {
_docker_compose_exec() { _docker_compose_exec() {
case "$prev" in case "$prev" in
--index|--user) --index|--user|-u)
return return
;; ;;
esac esac
case "$cur" in 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 __docker_compose_services_running

View File

@ -241,7 +241,7 @@ __docker-compose_subcommand() {
$opts_help \ $opts_help \
'-d[Detached mode: Run command in the background.]' \ '-d[Detached mode: Run command in the background.]' \
'--privileged[Give extended privileges to the process.]' \ '--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.]' \ '-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: ' \ '--index=[Index of the container if there are multiple instances of a service \[default: 1\]]:index: ' \
'(-):running services:__docker-compose_runningservices' \ '(-):running services:__docker-compose_runningservices' \