_mix 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #compdef mix
  2. #autoload
  3. # Elixir mix zsh completion
  4. local -a _1st_arguments
  5. _1st_arguments=(
  6. 'app.config:Configures all registered apps'
  7. 'app.start:Start all registered apps'
  8. 'app.tree:Prints the application tree'
  9. 'archive:Lists installed archives'
  10. 'archive.build:Archive this project into a .ez file'
  11. 'archive.install:Install an archive locally'
  12. 'archive.uninstall:Uninstall archives'
  13. 'clean:Delete generated application files'
  14. 'cmd:Executes the given command'
  15. 'compile:Compile source files'
  16. 'compile.protocols:Consolidates all protocols in all paths'
  17. 'deps:List dependencies and their status'
  18. "deps.clean:Remove the given dependencies' files"
  19. 'deps.compile:Compile dependencies'
  20. 'deps.get:Get all out of date dependencies'
  21. 'deps.tree:Prints the dependency tree'
  22. 'deps.unlock:Unlock the given dependencies'
  23. 'deps.update:Update the given dependencies'
  24. 'do:Executes the tasks separated by comma'
  25. 'ecto.create:Create Ecto database'
  26. 'ecto.drop:Drop the storage for the given repository'
  27. 'ecto.dump:Dumps the current environment’s database structure'
  28. 'ecto.gen.migration:Generates a migration'
  29. 'ecto.gen.repo:Generates a new repository'
  30. 'ecto.load:Loads the current environment’s database structure'
  31. 'ecto.migrate:Runs Ecto migration'
  32. 'ecto.migrations:Displays the up / down migration status'
  33. 'ecto.rollback:Reverts applied migrations'
  34. 'escript:Lists installed escripts'
  35. 'escript.build:Builds an escript for the project'
  36. 'escript.install:Installs an escript locally'
  37. 'escript.uninstall:Uninstalls escripts'
  38. 'firmware:Nerves - Build a firmware image for the selected target platform'
  39. 'firmware.burn:Nerves - Writes the generated firmware image to an attached SDCard or file'
  40. 'firmware.image:Nerves - Create a firmware image file that can be copied byte-for-byte'
  41. 'format:Formats the given files and patterns'
  42. 'help:Print help information for tasks'
  43. 'hex:Print hex help information'
  44. 'hex.audit:Shows retired Hex deps for the current project'
  45. 'hex.build:Builds a new package version locally'
  46. 'hex.config:Reads, updates or deletes local Hex config'
  47. 'hex.docs:Fetches or opens documentation of a package'
  48. 'hex.info:Print hex information'
  49. 'hex.organization:Manages Hex.pm organizations'
  50. 'hex.key:Hex API key tasks'
  51. 'hex.outdated:Shows outdated Hex deps for the current project'
  52. 'hex.owner:Manages Hex package ownership'
  53. 'hex.package:Fetches or diffs packages'
  54. 'hex.publish:Publish a new package version'
  55. 'hex.registry:Manages local Hex registries'
  56. 'hex.repo:Manages Hex repositories'
  57. 'hex.retire:Retires a package version'
  58. 'hex.search:Search for package names'
  59. 'hex.sponsor:Show Hex packages accepting sponsorships'
  60. 'hex.user:Manages your Hex user account'
  61. 'loadconfig:Loads and persists the given configuration'
  62. 'local:List local tasks'
  63. 'local.hex:Install hex locally'
  64. 'local.phoenix:Updates Phoenix locally'
  65. 'local.phx:Updates the Phoenix project generator locally'
  66. 'local.public_keys:Manages public keys'
  67. 'local.rebar:Install rebar locally'
  68. 'nerves.artifact:Create an artifact for a specified Nerves package'
  69. 'nerves.artifact.get:Nerves get artifacts'
  70. 'nerves.info:Prints Nerves system information'
  71. 'nerves.new:Create a new Nerves application'
  72. 'nerves.release.init:Prepare a new Nerves project for use with releases'
  73. 'new:Create a new Elixir project'
  74. 'phoenix.digest:Digests and compress static files'
  75. 'phoenix.gen.channel:Generates a Phoenix channel'
  76. 'phoenix.gen.html:Generates controller, model and views for an HTML based resource'
  77. 'phoenix.gen.json:Generates a controller and model for a JSON based resource'
  78. 'phoenix.gen.model:Generates an Ecto model'
  79. 'phoenix.gen.secret:Generates a secret'
  80. 'phoenix.new:Creates a new Phoenix v1.2.1 application'
  81. 'phoenix.routes:Prints all routes'
  82. 'phoenix.server:Starts applications and their servers'
  83. 'phx.digest:Digests and compresses static files'
  84. 'phx.digest.clean:Removes old versions of static assets.'
  85. 'phx.gen.auth:Generates authentication logic for a resource'
  86. 'phx.gen.cert:Generates a self-signed certificate for HTTPS testing'
  87. 'phx.gen.channel:Generates a Phoenix channel'
  88. 'phx.gen.context:Generates a context with functions around an Ecto schema'
  89. 'phx.gen.embedded:Generates an embedded Ecto schema file'
  90. 'phx.gen.html:Generates controller, views, and context for an HTML resource'
  91. 'phx.gen.json:Generates controller, views, and context for a JSON resource'
  92. 'phx.gen.live:Generates LiveView, templates, and context for a resource'
  93. 'phx.gen.notifier:Generates a notifier that delivers emails by default'
  94. 'phx.gen.presence:Generates a Presence tracker'
  95. 'phx.gen.schema:Generates an Ecto schema and migration file'
  96. 'phx.gen.secret:Generates a secret'
  97. 'phx.gen.socket:Generates a Phoenix socket handler'
  98. 'phx.new:Creates a new Phoenix application'
  99. 'phx.new.ecto:Creates a new Ecto project within an umbrella project'
  100. 'phx.new.web:Creates a new Phoenix web project within an umbrella project'
  101. 'phx.routes:Prints all routes'
  102. 'phx.server:Starts applications and their servers'
  103. 'profile.cprof:Profiles the given file or expression with cprof'
  104. 'profile.eprof:Profiles the given file or expression with eprof'
  105. 'profile.fprof:Profiles the given file or expression with fprof'
  106. 'release:Assembles a self-contained release'
  107. 'release.init:Generates sample files for releases'
  108. 'run:Run the given file or expression'
  109. "test:Run a project's tests"
  110. 'test.coverage:Build report from exported test coverage'
  111. 'xref:Prints cross reference information'
  112. '--help:Describe available tasks'
  113. '--version:Prints the Elixir version information'
  114. )
  115. __task_list ()
  116. {
  117. local expl
  118. declare -a tasks
  119. tasks=(app.config app.start app.tree archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.tree deps.unlock deps.update do ecto.create ecto.drop ecto.dump ecto.gen.migration ecto.gen.repo ecto.load ecto.migrate ecto.migrations ecto.rollback escript escript.build escript.install escript.uninstall firmware firmware.burn firmware.image format help hex hex.audit hex.build hex.config hex.docs hex.info hex.organization hex.key hex.outdated hex.owner hex.package hex.publish hex.registry hex.repo hex.retire hex.search hex.sponsor hex.user loadconfig local local.hex local.phoenix local.phx local.public_keys local.rebar nerves.artifact nerves.artifact.get nerves.info nerves.new nerves.release.init new phoenix.digest phoenix.gen.channel phoenix.gen.html phoenix.gen.json phoenix.gen.model phoenix.gen.secret phoenix.new phoenix.routes phoenix.server phx.digest phx.digest.clean phx.gen.auth phx.gen.cert phx.gen.channel phx.gen.context phx.gen.embedded phx.gen.html phx.gen.json phx.gen.live phx.gen.notifier phx.gen.presence phx.gen.schema phx.gen.secret phx.gen.socket phx.new phx.new.ecto phx.new.web phx.routes phx.server profile.cprof profile.eprof profile.fprof release release.init run test test.coverage xref)
  120. _wanted tasks expl 'help' compadd $tasks
  121. }
  122. local expl
  123. local curcontext="$curcontext" state line
  124. typeset -A opt_args
  125. _arguments -C \
  126. ':command:->command' \
  127. '*::options:->options'
  128. case $state in
  129. (command)
  130. _describe -t commands "mix subcommand" _1st_arguments
  131. return
  132. ;;
  133. (options)
  134. case $line[1] in
  135. (help)
  136. _arguments ':feature:__task_list'
  137. ;;
  138. (test)
  139. _files
  140. ;;
  141. (run)
  142. _files
  143. ;;
  144. esac
  145. ;;
  146. esac