_adb 1.1 KB

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