@@ -27,20 +27,25 @@ local -a _docker_machine_cmds
27
27
28
28
_docker_machine_cmds=(
29
29
'active:Get or set the active machine' \
30
- 'create:Create a machine' \
31
30
'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' \
32
33
'inspect:Inspect information about a machine' \
33
34
'ip:Get the IP address of a machine' \
34
35
'kill:Kill a machine' \
35
36
'ls:List machines' \
37
+ 'provision:Re-provision existing machines' \
38
+ 'regenerate-certs:Regenerate TLS Certificates for a machine' \
36
39
'restart:Restart a machine' \
37
40
'rm:Remove a machine' \
38
- 'env:Display the commands to set up the environment for the Docker client' \
39
41
'ssh:Log into or run a command on a machine with SSH' \
42
+ 'scp:Copy files between machines' \
40
43
'start:Start a machine' \
44
+ 'status:Get the status of a machine' \
41
45
'stop:Stop a machine' \
42
46
'upgrade:Upgrade a machine to the latest version of Docker' \
43
47
'url:Get the URL of a machine' \
48
+ 'version:Show the Docker Machine version or a machine docker version' \
44
49
'help:Shows a list of commands or help for one command'
45
50
)
46
51
@@ -52,20 +57,25 @@ __active() {
52
57
__help() {
53
58
_values 'Get help for subcommand' \
54
59
'active' \
55
- 'create' \
56
60
'config' \
61
+ 'create' \
62
+ 'env' \
57
63
'inspect' \
58
64
'ip' \
59
65
'kill' \
60
66
'ls' \
67
+ 'provision' \
68
+ 'regenerate-certs' \
61
69
'restart' \
62
70
'rm' \
63
- 'env' \
64
71
'ssh' \
72
+ 'scp' \
65
73
'start' \
74
+ 'status' \
66
75
'stop' \
67
76
'upgrade' \
68
77
'url' \
78
+ 'version' \
69
79
'help'
70
80
}
71
81
@@ -212,14 +222,35 @@ __ls() {
212
222
'--quiet[Enable quiet mode]'
213
223
}
214
224
225
+ __provision() {
226
+ __machines
227
+ }
228
+
229
+ __regenerate-certs() {
230
+ _arguments \
231
+ '--force[Force rebuild and do not prompt]'
232
+ __machines
233
+ }
234
+
215
235
__restart() {
216
236
__machines
217
237
}
218
238
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
+
219
246
__start() {
220
247
__machines
221
248
}
222
249
250
+ __status() {
251
+ __machines
252
+ }
253
+
223
254
__stop() {
224
255
__machines
225
256
}
@@ -240,6 +271,10 @@ __url() {
240
271
__machines
241
272
}
242
273
274
+ __version() {
275
+ __machines
276
+ }
277
+
243
278
# common args
244
279
_arguments \
245
280
'--debug[Enable debug mode]' \
@@ -261,10 +296,12 @@ local -a _command_args
261
296
case "$words[1]" in
262
297
active)
263
298
__active ;;
264
- create)
265
- __create ;;
266
299
config)
267
300
__config ;;
301
+ create)
302
+ __create ;;
303
+ env)
304
+ __env ;;
268
305
inspect)
269
306
__inspect ;;
270
307
ip)
@@ -273,16 +310,22 @@ case "$words[1]" in
273
310
__kill ;;
274
311
ls)
275
312
__ls ;;
313
+ provision)
314
+ __provision ;;
315
+ regenerate-certs)
316
+ __regenerate-certs ;;
276
317
restart)
277
318
__restart ;;
278
319
rm)
279
320
__rm ;;
280
- env)
281
- __env ;;
282
321
ssh)
283
322
__ssh ;;
323
+ scp)
324
+ __scp ;;
284
325
start)
285
326
__start ;;
327
+ status)
328
+ __status ;;
286
329
stop)
287
330
__stop ;;
288
331
upgrade)
0 commit comments