docker-machine: added all commands for docker-machine 0.6.0

This commit is contained in:
Daniel Serodio 2016-04-07 18:26:36 -03:00
parent 6a0e2f7f8f
commit af8865165c
1 changed files with 43 additions and 0 deletions

View File

@ -34,13 +34,18 @@ _docker_machine_cmds=(
'ip:Get the IP address of a machine' \ 'ip:Get the IP address of a machine' \
'kill:Kill a machine' \ 'kill:Kill a machine' \
'ls:List machines' \ 'ls:List machines' \
'provision:Re-provision existing machines' \
'regenerate-certs:Regenerate TLS Certificates for a machine' \
'restart:Restart a machine' \ 'restart:Restart a machine' \
'rm:Remove a machine' \ 'rm:Remove a machine' \
'ssh:Log into or run a command on a machine with SSH' \ 'ssh:Log into or run a command on a machine with SSH' \
'scp:Copy files between machines' \
'start:Start a machine' \ 'start:Start a machine' \
'status:Get the status of a machine' \
'stop:Stop a machine' \ 'stop:Stop a machine' \
'upgrade:Upgrade a machine to the latest version of Docker' \ 'upgrade:Upgrade a machine to the latest version of Docker' \
'url:Get the URL of a machine' \ 'url:Get the URL of a machine' \
'version:Show the Docker Machine version or a machine docker version' \
'help:Shows a list of commands or help for one command' 'help:Shows a list of commands or help for one command'
) )
@ -59,13 +64,18 @@ __help() {
'ip' \ 'ip' \
'kill' \ 'kill' \
'ls' \ 'ls' \
'provision' \
'regenerate-certs' \
'restart' \ 'restart' \
'rm' \ 'rm' \
'ssh' \ 'ssh' \
'scp' \
'start' \ 'start' \
'status' \
'stop' \ 'stop' \
'upgrade' \ 'upgrade' \
'url' \ 'url' \
'version' \
'help' 'help'
} }
@ -212,14 +222,35 @@ __ls() {
'--quiet[Enable quiet mode]' '--quiet[Enable quiet mode]'
} }
__provision() {
__machines
}
__regenerate-certs() {
_arguments \
'--force[Force rebuild and do not prompt]'
__machines
}
__restart() { __restart() {
__machines __machines
} }
__scp() {
# This can certainly be improved, but it's a start
_arguments \
'--recursive[Copy files recursively (required to copy directories)]'
__machines
}
__start() { __start() {
__machines __machines
} }
__status() {
__machines
}
__stop() { __stop() {
__machines __machines
} }
@ -240,6 +271,10 @@ __url() {
__machines __machines
} }
__version() {
__machines
}
# common args # common args
_arguments \ _arguments \
'--debug[Enable debug mode]' \ '--debug[Enable debug mode]' \
@ -275,14 +310,22 @@ case "$words[1]" in
__kill ;; __kill ;;
ls) ls)
__ls ;; __ls ;;
provision)
__provision ;;
regenerate-certs)
__regenerate-certs ;;
restart) restart)
__restart ;; __restart ;;
rm) rm)
__rm ;; __rm ;;
ssh) ssh)
__ssh ;; __ssh ;;
scp)
__scp ;;
start) start)
__start ;; __start ;;
status)
__status ;;
stop) stop)
__stop ;; __stop ;;
upgrade) upgrade)