From d95248e9cbebf94ba2a596b7c8add7f3ba93a7d0 Mon Sep 17 00:00:00 2001 From: luca020400 Date: Fri, 8 May 2015 15:18:26 +0200 Subject: [PATCH] add fastboot plugin --- plugins/fastboot/README.md | 8 ++++++++ plugins/fastboot/_fastboot | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 plugins/fastboot/README.md create mode 100644 plugins/fastboot/_fastboot diff --git a/plugins/fastboot/README.md b/plugins/fastboot/README.md new file mode 100644 index 000000000..cca740365 --- /dev/null +++ b/plugins/fastboot/README.md @@ -0,0 +1,8 @@ +# fastboot autocomplete plugin + +* Adds autocomplete options for all fastboot commands. + + +## Requirements + +In order to make this work, you will need to have the Android fastboot tools set up in your path. diff --git a/plugins/fastboot/_fastboot b/plugins/fastboot/_fastboot new file mode 100644 index 000000000..c9df53853 --- /dev/null +++ b/plugins/fastboot/_fastboot @@ -0,0 +1,35 @@ +#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