Merge pull request #3206 from albers/completion-exec

bash completion for `docker-compose exec`
This commit is contained in:
Joffrey F 2016-03-24 10:44:19 -07:00
commit aabeb56527
1 changed files with 19 additions and 0 deletions

View File

@ -186,6 +186,24 @@ _docker_compose_events() {
} }
_docker_compose_exec() {
case "$prev" in
--index|--user)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-d --help --index --privileged -T --user" -- "$cur" ) )
;;
*)
__docker_compose_services_running
;;
esac
}
_docker_compose_help() { _docker_compose_help() {
COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) ) COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) )
} }
@ -441,6 +459,7 @@ _docker_compose() {
create create
down down
events events
exec
help help
kill kill
logs logs