mirror of https://github.com/docker/compose.git
Merge pull request #1928 from albers/completion-timeout
Bash completion for `docker-compose scale --timeout`
This commit is contained in:
commit
21c16a787a
|
@ -223,7 +223,7 @@ _docker_compose_pull() {
|
||||||
|
|
||||||
_docker_compose_restart() {
|
_docker_compose_restart() {
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
-t | --timeout)
|
--timeout|-t)
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -278,16 +278,20 @@ _docker_compose_scale() {
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
=)
|
=)
|
||||||
COMPREPLY=("$cur")
|
COMPREPLY=("$cur")
|
||||||
|
return
|
||||||
;;
|
;;
|
||||||
*)
|
--timeout|-t)
|
||||||
COMPREPLY=( $(compgen -S "=" -W "$(___docker_compose_all_services_in_compose_file)" -- "$cur") )
|
return
|
||||||
compopt -o nospace
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
-*)
|
-*)
|
||||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--help --timeout -t" -- "$cur" ) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=( $(compgen -S "=" -W "$(___docker_compose_all_services_in_compose_file)" -- "$cur") )
|
||||||
|
compopt -o nospace
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -307,7 +311,7 @@ _docker_compose_start() {
|
||||||
|
|
||||||
_docker_compose_stop() {
|
_docker_compose_stop() {
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
-t | --timeout)
|
--timeout|-t)
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -337,7 +341,7 @@ _docker_compose_unpause() {
|
||||||
|
|
||||||
_docker_compose_up() {
|
_docker_compose_up() {
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
-t | --timeout)
|
--timeout|-t)
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -398,11 +402,11 @@ _docker_compose() {
|
||||||
local compose_file compose_project
|
local compose_file compose_project
|
||||||
while [ $counter -lt $cword ]; do
|
while [ $counter -lt $cword ]; do
|
||||||
case "${words[$counter]}" in
|
case "${words[$counter]}" in
|
||||||
-f|--file)
|
--file|-f)
|
||||||
(( counter++ ))
|
(( counter++ ))
|
||||||
compose_file="${words[$counter]}"
|
compose_file="${words[$counter]}"
|
||||||
;;
|
;;
|
||||||
-p|--project-name)
|
--project-name|p)
|
||||||
(( counter++ ))
|
(( counter++ ))
|
||||||
compose_project="${words[$counter]}"
|
compose_project="${words[$counter]}"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue