From 89f1d94a3052e2eabd3e86b856eada8e51fc65b4 Mon Sep 17 00:00:00 2001 From: Frederik Mogensen Date: Sun, 7 Aug 2011 21:43:32 +0200 Subject: Added autocompleting plugin for Android Debug Bridge (adb). --- plugins/adb/_adb | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 plugins/adb/_adb (limited to 'plugins/adb/_adb') diff --git a/plugins/adb/_adb b/plugins/adb/_adb new file mode 100644 index 000000000..1efcb9eb0 --- /dev/null +++ b/plugins/adb/_adb @@ -0,0 +1,37 @@ +#compdef adb +#autoload + +# in order to make this work, you will need to have the android adb tools + +# adb zsh completion, based on homebrew completion + +local -a _1st_arguments +_1st_arguments=( +'bugreport:return all information from the device that should be included in a bug report.' +'connect:connect to a device via TCP/IP Port 5555 is default.' +'devices:list all connected devices' +'disconnect:disconnect from a TCP/IP device. Port 5555 is default.' +'emu:run emulator console command' +'forward:forward socket connections' +'help:show the help message' +'install:push this package file to the device and install it' +'jdwp:list PIDs of processes hosting a JDWP transport' +'logcat:View device log' +'pull:copy file/dir from device' +'push:copy file/dir to device' +'shell:run remote shell interactively' +'sync:copy host->device only if changed (-l means list but dont copy)' +'uninstall:remove this app package from the device' +'version:show version num' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "adb subcommand" _1st_arguments + return +fi -- cgit v1.2.3-70-g09d2 From 8ad9122ba49bb0a41ca7dbad03cf5438477cc283 Mon Sep 17 00:00:00 2001 From: Frederik Mogensen Date: Tue, 3 Jan 2012 17:12:22 +0100 Subject: Added _files to complete all arguments following the first as files --- plugins/adb/_adb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/adb/_adb') diff --git a/plugins/adb/_adb b/plugins/adb/_adb index 1efcb9eb0..4c998172d 100644 --- a/plugins/adb/_adb +++ b/plugins/adb/_adb @@ -35,3 +35,5 @@ if (( CURRENT == 1 )); then _describe -t commands "adb subcommand" _1st_arguments return fi + +_files -- cgit v1.2.3-70-g09d2 From a414b5e3d906bb13062ca9ec19118c01ac44dc2a Mon Sep 17 00:00:00 2001 From: XerWandeRer Date: Mon, 16 Mar 2015 13:55:35 +0800 Subject: Update _adb Added support for `tcpip` option --- plugins/adb/_adb | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/adb/_adb') diff --git a/plugins/adb/_adb b/plugins/adb/_adb index 4c998172d..22089581a 100644 --- a/plugins/adb/_adb +++ b/plugins/adb/_adb @@ -21,6 +21,7 @@ _1st_arguments=( 'push:copy file/dir to device' 'shell:run remote shell interactively' 'sync:copy host->device only if changed (-l means list but dont copy)' +‘tcpip:restart host adb in tcpip mode’ 'uninstall:remove this app package from the device' 'version:show version num' ) -- cgit v1.2.3-70-g09d2 From af4ffe56eae27c85ed472307554fd7347966d316 Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Thu, 7 May 2015 13:24:33 +0200 Subject: adb: add more commands --- plugins/adb/_adb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'plugins/adb/_adb') diff --git a/plugins/adb/_adb b/plugins/adb/_adb index 22089581a..f30f3247f 100644 --- a/plugins/adb/_adb +++ b/plugins/adb/_adb @@ -16,14 +16,22 @@ _1st_arguments=( 'help:show the help message' 'install:push this package file to the device and install it' 'jdwp:list PIDs of processes hosting a JDWP transport' -'logcat:View device log' +'kill-server:kill the server if it is running' +'logcat:view device log' 'pull:copy file/dir from device' 'push:copy file/dir to device' +'reboot:reboots the device, optionally into the bootloader or recovery program' +'reboot-bootloader:reboots the device into the bootloader' +'remount:remounts the partitions on the device read-write' +'root:restarts the adbd daemon with root permissions' +'sideload:push a ZIP to device and install it' 'shell:run remote shell interactively' 'sync:copy host->device only if changed (-l means list but dont copy)' -‘tcpip:restart host adb in tcpip mode’ +'start-server:ensure that there is a server running' +'tcpip:restart host adb in tcpip mode' 'uninstall:remove this app package from the device' 'version:show version num' +'wait-for-device:block until device is online' ) local expl -- cgit v1.2.3-70-g09d2