My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_emulator 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #compdef emulator
  2. # ------------------------------------------------------------------------------
  3. # Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions are met:
  8. # * Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. # * Redistributions in binary form must reproduce the above copyright
  11. # notice, this list of conditions and the following disclaimer in the
  12. # documentation and/or other materials provided with the distribution.
  13. # * Neither the name of the zsh-users nor the
  14. # names of its contributors may be used to endorse or promote products
  15. # derived from this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  18. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  19. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
  21. # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  22. # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  23. # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  24. # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  26. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. # ------------------------------------------------------------------------------
  28. # Description
  29. # -----------
  30. #
  31. # Completion script for emulator (Android Emulator) 12.0
  32. # (http://developer.android.com/guide/developing/tools/emulator.html).
  33. #
  34. # ------------------------------------------------------------------------------
  35. # Authors
  36. # -------
  37. #
  38. # * Julien Nicoulaud <julien.nicoulaud@gmail.com>
  39. #
  40. # ------------------------------------------------------------------------------
  41. typeset -A opt_args
  42. local context state line curcontext="$curcontext"
  43. # TODO All image options are contextual to -sysdir value
  44. # TODO All skin options are contextual to -skindir value
  45. # TODO snapshot options are mutually exclusive
  46. # TODO Use '-snapshot-list' output for snapshot names
  47. # TODO Complete -avd with avd names ?
  48. # TODO -logcat: use completer from _adb
  49. # TODO Complete options with device values
  50. # TODO Complete -prop
  51. _arguments \
  52. '(- : *)-version[display emulator version number]' \
  53. '(- : *)-help[display help information]' \
  54. '(- : *)-help-disk-images[about disk images]' \
  55. '(- : *)-help-keys[supported key bindings]' \
  56. '(- : *)-help-debug-tags[debug tags for -debug <tags>]' \
  57. '(- : *)-help-char-devices[character <device> specification]' \
  58. '(- : *)-help-environment[environment variables]' \
  59. '(- : *)-help-keyset-file[key bindings configuration file]' \
  60. '(- : *)-help-virtual-device[virtual device management]' \
  61. '(- : *)-help-sdk-images[about disk images when using the SDK]' \
  62. '(- : *)-help-build-images[about disk images when building Android]' \
  63. '(- : *)-help-all[prints all help content]' \
  64. '(- : *)-help-'{version,sysdir,system,image,datadir,kernel,ramdisk,initdata,data,partition-size,cache,no-cache,nocache,sdcard,snapstorage,no-snapstorage,snapshot,no-snapshot,no-snapshot-save,no-snapshot-load,snapshot-list,no-snapshot-update-time,wipe-data,avd,skindir,skin,noskin,no-skin,memory,netspeed,netdelay,netfast,trace,show-kernel,shell,no-jni,nojni,logcat,noaudio,no-audio,audio,raw-keys,radio,port,ports,onion,onion-alpha,onion-rotation,scale,dpi-device,http-proxy,timezone,dns-server,cpu-delay,no-boot-anim,no-window,report-console,gps,keyset,shell-serial,tcpdump,bootchart,charmap,prop,shared-net-id,nand-limits,memcheck,qemu,verbose}'[print option-specific help]' \
  65. '-sysdir[search for system disk images in the directory]: :_files -/' \
  66. '(-system -image)'{-system,-image}'[read initial system image from the file]: :_files -g "*.img"' \
  67. '-datadir[write user data into the directory]: :_files -/' \
  68. '-kernel[use specific emulated kernel]: :_files' \
  69. '-ramdisk[ramdisk image (default <system>/ramdisk.img]: :_files -g "*.img"' \
  70. '-initdata[same as '\''-init-data <file>'\'']: :_files' \
  71. '-data[data image (default <datadir>/userdata-qemu.img]: :_files -g "*.img"' \
  72. '-partition-size[system/data partition size]:size (in MBs)' \
  73. '(-no-cache -nocache)-cache[cache partition image (default is temporary file)]: :_files -g "*.img"' \
  74. '(-cache -no-cache -nocache)'{-no-cache,-nocache}'[disable the cache partition]' \
  75. '-sdcard[SD card image (default <system>/sdcard.img]: :_files -g "*.img"' \
  76. '(-no-snapstorage)-snapstorage[file that contains all state snapshots (default <datadir>/snapshots.img)]: :_files -g "*.img"' \
  77. '(-snapstorage)-no-snapstorage[do not mount a snapshot storage file (this disables all snapshot functionality)]' \
  78. '-snapshot[name of snapshot within storage file for auto-start and auto-save (default '\''default-boot'\'')]:snapshot name' \
  79. '-no-snapshot[perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage]' \
  80. '-no-snapshot-save[do not auto-save to snapshot on exit: abandon changed state]' \
  81. '-no-snapshot-load[do not auto-start from snapshot: perform a full boot]' \
  82. '-snapshot-list[show a list of available snapshots]' \
  83. '-no-snapshot-update-time[do not do try to correct snapshot time on restore]' \
  84. '-wipe-data[reset the user data image (copy it from initdata)]' \
  85. '-avd[use a specific android virtual device]:android virtual device name' \
  86. '-skindir[search skins in <dir> (default <system>/skins)]: :_files -/' \
  87. '-skin[select a given skin]' \
  88. '(-noskin -no-skin)'{-noskin,-no-skin}'[don'\''t use any emulator skin]' \
  89. '-memory[physical RAM size in MBs]:size (in MBs)' \
  90. '-netspeed[maximum network download/upload speeds]:speed' \
  91. '-netdelay[network latency emulation]:delay' \
  92. '-netfast[disable network shaping]' \
  93. '-trace[enable code profiling (F9 to start)]:trace name' \
  94. '-show-kernel[display kernel messages]' \
  95. '-shell[enable root shell on current terminal]' \
  96. {-no-jni,-nojni}'[disable JNI checks in the Dalvik runtime]' \
  97. '-logcat[enable logcat output with given tags]:logcat tags' \
  98. '(-audio -noaudio -no-audio)'{-noaudio,-no-audio}'[disable audio support]' \
  99. '(-noaudio -no-audio)-audio[use specific audio backend]:audio backend' \
  100. '-raw-keys[disable Unicode keyboard reverse-mapping]' \
  101. '-radio[redirect radio modem interface to character device]:device' \
  102. '-port[TCP port that will be used for the console]:port number' \
  103. '-ports[TCP ports used for the console and adb bridge]:console port,adb port' \
  104. '-onion[use overlay PNG image over screen]: :_files -g "*.(png|PNG)"' \
  105. '-onion-alpha[specify onion-skin translucency]:percentage' \
  106. '-onion-rotation[specify onion-skin rotation]:rotation:((1 2 3 4))' \
  107. '-scale[scale emulator window]:scale' \
  108. '-dpi-device[specify device'\''s resolution in dpi (default 165)]:dpi' \
  109. '-http-proxy[make TCP connections through a HTTP/HTTPS proxy]:proxy' \
  110. '-timezone[use this timezone instead of the host'\''s default]:timezone' \
  111. '-dns-server[use this DNS server(s) in the emulated system]:DNS servers' \
  112. '-cpu-delay[throttle CPU emulation]:CPU delay' \
  113. '-no-boot-anim[disable animation for faster boot]' \
  114. '-no-window[disable graphical window display]' \
  115. '-report-console[report console port to remote socket]: :_socket' \
  116. '-gps[redirect NMEA GPS to character device]:device' \
  117. '-keyset[specify keyset file name]: :_files' \
  118. '-shell-serial[specific character device for root shell]:device' \
  119. '-tcpdump[capture network packets to file]: :_files' \
  120. '-bootchart[enable bootcharting]:timeout' \
  121. '-charmap[use specific key character map]: :_files' \
  122. '*-prop[set system property on boot]:name=value' \
  123. '-shared-net-id[join the shared network, using IP address 10.1.2.<number>]:number' \
  124. '-nand-limits[enforce NAND/Flash read/write thresholds]:limits' \
  125. '-memcheck[enable memory access checking]:flags' \
  126. '-qemu[pass arguments to qemu]:arguments' \
  127. '-verbose[same as '\''-debug-init'\'']' \
  128. '*'{-debug,-debug-,-debug-no-}'[enable/disable specific debug messages]:tag'
  129. # Local Variables:
  130. # mode: Shell-Script
  131. # sh-indentation: 2
  132. # indent-tabs-mode: nil
  133. # sh-basic-offset: 2
  134. # End:
  135. # vim: ft=zsh sw=2 ts=2 et