_boot2docker 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #compdef boot2docker
  2. # Boot2docker autocompletion for oh-my-zsh
  3. # Requires: Boot2docker installed
  4. # Author: Manfred Touron (@moul)
  5. local -a _1st_arguments
  6. _1st_arguments=(
  7. "init":"Create a new Boot2Docker VM."
  8. "up":"Start VM from any states."
  9. "start":"Start VM from any states."
  10. "boot":"Start VM from any states."
  11. "ssh":"[ssh-command] Login to VM via SSH."
  12. "save":"Suspend VM and save state to disk."
  13. "suspend":"Suspend VM and save state to disk."
  14. "down":"Gracefully shutdown the VM."
  15. "stop":"Gracefully shutdown the VM."
  16. "halt":"Gracefully shutdown the VM."
  17. "restart":"Gracefully reboot the VM."
  18. "poweroff":"Forcefully power off the VM (may corrupt disk image)."
  19. "reset":"Forcefully power cycle the VM (may corrupt disk image)."
  20. "delete":"Delete Boot2Docker VM and its disk image."
  21. "destroy":"Delete Boot2Docker VM and its disk image."
  22. "config":"Show selected profile file settings."
  23. "cfg":"Show selected profile file settings."
  24. "info":"Display detailed information of VM."
  25. "ip":"Display the IP address of the VM's Host-only network."
  26. "socket":"Display the DOCKER_HOST socket to connect to."
  27. "shellinit":"Display the shell command to set up the Docker client."
  28. "status":"Display current state of VM."
  29. "download":"Download Boot2Docker ISO image."
  30. "upgrade":"Upgrade the Boot2Docker ISO image (restart if running)."
  31. "version":"Display version information."
  32. )
  33. _arguments \
  34. '(--basevmdk)--basevmdk[Path to VMDK to use as base for persistent partition]' \
  35. '(--dhcp)--dhcp[enable VirtualBox host-only network DHCP.]' \
  36. '(--dhcpip)--dhcpip[VirtualBox host-only network DHCP server address.]' \
  37. '(-s --disksize)'{-s,--disksize}'[boot2docker disk image size (in MB).]' \
  38. '(--dockerport)--dockerport[host Docker port (forward to port 2376 in VM). (deprecated - use with care)]' \
  39. '(--driver)--driver[hypervisor driver.]' \
  40. '(--hostip)--hostip[VirtualBox host-only network IP address.]' \
  41. '(--iso)--iso[path to boot2docker ISO image.]' \
  42. '(--iso-url)--iso-url[/api.github.com/repos/boot2docker/boot2docker/releases": source URL to provision the boot2docker ISO image.]' \
  43. '(--lowerip)--lowerip[VirtualBox host-only network DHCP lower bound.]' \
  44. '(--memory)'{-m,--memory}'[virtual machine memory size (in MB).]' \
  45. '(--netmask)--netmask[VirtualBox host-only network mask.]' \
  46. '(--no-dummy)--no-dummy[Example parameter for the dummy driver.]' \
  47. '(--retries)--retries[number of port knocking retries during 'start']' \
  48. '(--serial)--serial[try serial console to get IP address (experimental)]' \
  49. '(--serialfile)--serialfile[path to the serial socket/pipe.]' \
  50. '(--ssh)--ssh[path to SSH client utility.]' \
  51. '(--ssh-keygen)--ssh-keygen[path to ssh-keygen utility.]' \
  52. '(--sshkey)--sshkey[path to SSH key to use.]' \
  53. '(--sshport)--sshport[host SSH port (forward to port 22 in VM).]' \
  54. '(--upperip)--upperip[VirtualBox host-only network DHCP upper bound.]' \
  55. '(--vbm)--vbm[path to VirtualBox management utility.]' \
  56. '(--vbox-share)--vbox-share[(defaults to "/Users=Users" if no shares are specified; use "disable" to explicitly prevent any shares from being created) List of directories to share during "up|start|boot" via VirtualBox Guest Additions, with optional labels]' \
  57. '(--verbose)'{-v,--verbose}'[display verbose command invocations.]' \
  58. '(--vm)--vm[virtual machine name.]' \
  59. '(--waittime)--waittime[Time in milliseconds to wait between port knocking retries during 'start']' \
  60. '*:: :->subcmds' && return 0
  61. #_arguments '*:: :->command'
  62. if (( CURRENT == 1 )); then
  63. _describe -t commands "boot2docker command" _1st_arguments
  64. return
  65. fi