mirror of
https://github.com/docker/compose.git
synced 2025-07-20 12:14:41 +02:00
Add docker-compose exec -u to docs and completion
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
2c83c9ffb9
commit
16bbe5d99c
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user