c207c839689b49db96ebd60eecdc8026cbb107e5

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1755 from johnjohndoe/feature/adb-autocompletion

Add autocompletion for adb

Diff

 1diff --git a/plugins/adb/_adb b/plugins/adb/_adb
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..4c998172dd98ebaeb2e8688cbf56f40f2473dd74
 4--- /dev/null
 5+++ b/plugins/adb/_adb
 6@@ -0,0 +1,39 @@
 7+#compdef adb
 8+#autoload
 9+
10+# in order to make this work, you will need to have the android adb tools
11+
12+# adb zsh completion, based on homebrew completion
13+
14+local -a _1st_arguments
15+_1st_arguments=(
16+'bugreport:return all information from the device that should be included in a bug report.'
17+'connect:connect to a device via TCP/IP Port 5555 is default.'
18+'devices:list all connected devices'
19+'disconnect:disconnect from a TCP/IP device. Port 5555 is default.'
20+'emu:run emulator console command'
21+'forward:forward socket connections'
22+'help:show the help message'
23+'install:push this package file to the device and install it'
24+'jdwp:list PIDs of processes hosting a JDWP transport'
25+'logcat:View device log'
26+'pull:copy file/dir from device'
27+'push:copy file/dir to device'
28+'shell:run remote shell interactively'
29+'sync:copy host->device only if changed (-l means list but dont copy)'
30+'uninstall:remove this app package from the device'
31+'version:show version num'
32+)
33+
34+local expl
35+local -a pkgs installed_pkgs
36+
37+_arguments \
38+	'*:: :->subcmds' && return 0
39+
40+if (( CURRENT == 1 )); then
41+	_describe -t commands "adb subcommand" _1st_arguments
42+	return
43+fi
44+
45+_files