#compdef fastboot #autoload # in order to make this work, you will need to have the android fastboot tools # fastboot zsh completion, based on homebrew completion local -a _1st_arguments _1st_arguments=( 'update:reflash device from update.zip' 'flashall:flash boot, system, vendor and if found recovery' 'flash: [ ] write a file to a flash partition' 'erase: erase a flash partition' 'format:[:[][:[]] format a flash partition' 'getvar: display a bootloader variable' 'boot: [ [ ] ] download and boot kernel' 'devices:list all connected devices' 'continue:continue with autoboot' 'reboot:reboot device normally' 'reboot-bootloader:reboot device into bootloader' 'help:show this help message' ) local expl local -a pkgs installed_pkgs _arguments \ '*:: :->subcmds' && return 0 if (( CURRENT == 1 )); then _describe -t commands "fastboot subcommand" _1st_arguments return fi _files