Skip to content

Commit 17743e1

Browse files
committed
Merge pull request #410 from dserodio/docker-machine
Added all docker-machine commands as of 0.6.0
2 parents f60d445 + af88651 commit 17743e1

File tree

1 file changed

+51
-8
lines changed

1 file changed

+51
-8
lines changed

Diff for: src/_docker-machine

+51-8
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,25 @@ local -a _docker_machine_cmds
2727

2828
_docker_machine_cmds=(
2929
'active:Get or set the active machine' \
30-
'create:Create a machine' \
3130
'config:Print the connection config for machine' \
31+
'create:Create a machine' \
32+
'env:Display the commands to set up the environment for the Docker client' \
3233
'inspect:Inspect information about a machine' \
3334
'ip:Get the IP address of a machine' \
3435
'kill:Kill a machine' \
3536
'ls:List machines' \
37+
'provision:Re-provision existing machines' \
38+
'regenerate-certs:Regenerate TLS Certificates for a machine' \
3639
'restart:Restart a machine' \
3740
'rm:Remove a machine' \
38-
'env:Display the commands to set up the environment for the Docker client' \
3941
'ssh:Log into or run a command on a machine with SSH' \
42+
'scp:Copy files between machines' \
4043
'start:Start a machine' \
44+
'status:Get the status of a machine' \
4145
'stop:Stop a machine' \
4246
'upgrade:Upgrade a machine to the latest version of Docker' \
4347
'url:Get the URL of a machine' \
48+
'version:Show the Docker Machine version or a machine docker version' \
4449
'help:Shows a list of commands or help for one command'
4550
)
4651

@@ -52,20 +57,25 @@ __active() {
5257
__help() {
5358
_values 'Get help for subcommand' \
5459
'active' \
55-
'create' \
5660
'config' \
61+
'create' \
62+
'env' \
5763
'inspect' \
5864
'ip' \
5965
'kill' \
6066
'ls' \
67+
'provision' \
68+
'regenerate-certs' \
6169
'restart' \
6270
'rm' \
63-
'env' \
6471
'ssh' \
72+
'scp' \
6573
'start' \
74+
'status' \
6675
'stop' \
6776
'upgrade' \
6877
'url' \
78+
'version' \
6979
'help'
7080
}
7181

@@ -212,14 +222,35 @@ __ls() {
212222
'--quiet[Enable quiet mode]'
213223
}
214224

225+
__provision() {
226+
__machines
227+
}
228+
229+
__regenerate-certs() {
230+
_arguments \
231+
'--force[Force rebuild and do not prompt]'
232+
__machines
233+
}
234+
215235
__restart() {
216236
__machines
217237
}
218238

239+
__scp() {
240+
# This can certainly be improved, but it's a start
241+
_arguments \
242+
'--recursive[Copy files recursively (required to copy directories)]'
243+
__machines
244+
}
245+
219246
__start() {
220247
__machines
221248
}
222249

250+
__status() {
251+
__machines
252+
}
253+
223254
__stop() {
224255
__machines
225256
}
@@ -240,6 +271,10 @@ __url() {
240271
__machines
241272
}
242273

274+
__version() {
275+
__machines
276+
}
277+
243278
# common args
244279
_arguments \
245280
'--debug[Enable debug mode]' \
@@ -261,10 +296,12 @@ local -a _command_args
261296
case "$words[1]" in
262297
active)
263298
__active ;;
264-
create)
265-
__create ;;
266299
config)
267300
__config ;;
301+
create)
302+
__create ;;
303+
env)
304+
__env ;;
268305
inspect)
269306
__inspect ;;
270307
ip)
@@ -273,16 +310,22 @@ case "$words[1]" in
273310
__kill ;;
274311
ls)
275312
__ls ;;
313+
provision)
314+
__provision ;;
315+
regenerate-certs)
316+
__regenerate-certs ;;
276317
restart)
277318
__restart ;;
278319
rm)
279320
__rm ;;
280-
env)
281-
__env ;;
282321
ssh)
283322
__ssh ;;
323+
scp)
324+
__scp ;;
284325
start)
285326
__start ;;
327+
status)
328+
__status ;;
286329
stop)
287330
__stop ;;
288331
upgrade)

0 commit comments

Comments
 (0)