Skip to content

Commit

Permalink
bash completion for docker-compose exec
Browse files Browse the repository at this point in the history
Signed-off-by: Harald Albers <[email protected]>
  • Loading branch information
albers committed Mar 24, 2016
1 parent 2b063d3 commit c9b02b7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contrib/completion/bash/docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) )
}
Expand Down Expand Up @@ -435,6 +453,7 @@ _docker_compose() {
create
down
events
exec
help
kill
logs
Expand Down

0 comments on commit c9b02b7

Please sign in to comment.