_adb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. ‘tcpip:restart host adb in tcpip mode’
  22. 'uninstall:remove this app package from the device'
  23. 'version:show version num'
  24. )
  25. local expl
  26. local -a pkgs installed_pkgs
  27. _arguments \
  28. '*:: :->subcmds' && return 0
  29. if (( CURRENT == 1 )); then
  30. _describe -t commands "adb subcommand" _1st_arguments
  31. return
  32. fi
  33. _files