2015-04-30 13:03:31 +02:00
|
|
|
|
#compdef mix
|
2013-07-20 05:19:11 +02:00
|
|
|
|
#autoload
|
|
|
|
|
|
|
|
|
|
# Elixir mix zsh completion
|
|
|
|
|
|
|
|
|
|
local -a _1st_arguments
|
|
|
|
|
_1st_arguments=(
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'app.config:Configures all registered apps'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'app.start:Start all registered apps'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'app.tree:Prints the application tree'
|
|
|
|
|
'archive:Lists installed archives'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'archive.build:Archive this project into a .ez file'
|
|
|
|
|
'archive.install:Install an archive locally'
|
|
|
|
|
'archive.uninstall:Uninstall archives'
|
|
|
|
|
'clean:Delete generated application files'
|
|
|
|
|
'cmd:Executes the given command'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'compile:Compile source files'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'compile.protocols:Consolidates all protocols in all paths'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'deps:List dependencies and their status'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
"deps.clean:Remove the given dependencies' files"
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'deps.compile:Compile dependencies'
|
|
|
|
|
'deps.get:Get all out of date dependencies'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'deps.tree:Prints the dependency tree'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'deps.unlock:Unlock the given dependencies'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'deps.update:Update the given dependencies'
|
|
|
|
|
'do:Executes the tasks separated by comma'
|
2018-04-25 22:12:19 +02:00
|
|
|
|
'ecto.create:Create Ecto database'
|
|
|
|
|
'ecto.drop:Drop the storage for the given repository'
|
|
|
|
|
'ecto.dump:Dumps the current environment’s database structure'
|
|
|
|
|
'ecto.gen.migration:Generates a migration'
|
|
|
|
|
'ecto.gen.repo:Generates a new repository'
|
|
|
|
|
'ecto.load:Loads the current environment’s database structure'
|
|
|
|
|
'ecto.migrate:Runs Ecto migration'
|
|
|
|
|
'ecto.migrations:Displays the up / down migration status'
|
|
|
|
|
'ecto.rollback:Reverts applied migrations'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'escript:Lists installed escripts'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'escript.build:Builds an escript for the project'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'escript.install:Installs an escript locally'
|
|
|
|
|
'escript.uninstall:Uninstalls escripts'
|
2018-10-03 20:10:40 +02:00
|
|
|
|
'firmware:Nerves - Build a firmware image for the selected target platform'
|
|
|
|
|
'firmware.burn:Nerves - Writes the generated firmware image to an attached SDCard or file'
|
|
|
|
|
'firmware.image:Nerves - Create a firmware image file that can be copied byte-for-byte'
|
2020-02-28 20:42:18 +01:00
|
|
|
|
'format:Formats the given files and patterns'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'help:Print help information for tasks'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'hex:Print hex help information'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'hex.audit:Shows retired Hex deps for the current project'
|
|
|
|
|
'hex.build:Builds a new package version locally'
|
|
|
|
|
'hex.config:Reads, updates or deletes local Hex config'
|
|
|
|
|
'hex.docs:Fetches or opens documentation of a package'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'hex.info:Print hex information'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'hex.organization:Manages Hex.pm organizations'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'hex.key:Hex API key tasks'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'hex.outdated:Shows outdated Hex deps for the current project'
|
|
|
|
|
'hex.owner:Manages Hex package ownership'
|
|
|
|
|
'hex.package:Fetches or diffs packages'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'hex.publish:Publish a new package version'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'hex.registry:Manages local Hex registries'
|
|
|
|
|
'hex.repo:Manages Hex repositories'
|
|
|
|
|
'hex.retire:Retires a package version'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'hex.search:Search for package names'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'hex.sponsor:Show Hex packages accepting sponsorships'
|
|
|
|
|
'hex.user:Manages your Hex user account'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'loadconfig:Loads and persists the given configuration'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'local:List local tasks'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'local.hex:Install hex locally'
|
2017-11-01 13:23:14 +01:00
|
|
|
|
'local.phoenix:Updates Phoenix locally'
|
|
|
|
|
'local.phx:Updates the Phoenix project generator locally'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'local.public_keys:Manages public keys'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'local.rebar:Install rebar locally'
|
2018-10-03 20:10:40 +02:00
|
|
|
|
'nerves.artifact:Create an artifact for a specified Nerves package'
|
|
|
|
|
'nerves.artifact.get:Nerves get artifacts'
|
|
|
|
|
'nerves.info:Prints Nerves system information'
|
|
|
|
|
'nerves.new:Create a new Nerves application'
|
|
|
|
|
'nerves.release.init:Prepare a new Nerves project for use with releases'
|
2015-04-30 13:03:31 +02:00
|
|
|
|
'new:Create a new Elixir project'
|
2016-08-11 02:28:56 +02:00
|
|
|
|
'phoenix.digest:Digests and compress static files'
|
|
|
|
|
'phoenix.gen.channel:Generates a Phoenix channel'
|
|
|
|
|
'phoenix.gen.html:Generates controller, model and views for an HTML based resource'
|
|
|
|
|
'phoenix.gen.json:Generates a controller and model for a JSON based resource'
|
|
|
|
|
'phoenix.gen.model:Generates an Ecto model'
|
|
|
|
|
'phoenix.gen.secret:Generates a secret'
|
2017-11-01 13:23:14 +01:00
|
|
|
|
'phoenix.new:Creates a new Phoenix v1.2.1 application'
|
2016-08-11 02:28:56 +02:00
|
|
|
|
'phoenix.routes:Prints all routes'
|
|
|
|
|
'phoenix.server:Starts applications and their servers'
|
2017-11-01 13:23:14 +01:00
|
|
|
|
'phx.digest:Digests and compresses static files'
|
|
|
|
|
'phx.digest.clean:Removes old versions of static assets.'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'phx.gen.auth:Generates authentication logic for a resource'
|
|
|
|
|
'phx.gen.cert:Generates a self-signed certificate for HTTPS testing'
|
2017-11-01 13:23:14 +01:00
|
|
|
|
'phx.gen.channel:Generates a Phoenix channel'
|
|
|
|
|
'phx.gen.context:Generates a context with functions around an Ecto schema'
|
|
|
|
|
'phx.gen.embedded:Generates an embedded Ecto schema file'
|
|
|
|
|
'phx.gen.html:Generates controller, views, and context for an HTML resource'
|
|
|
|
|
'phx.gen.json:Generates controller, views, and context for a JSON resource'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'phx.gen.live:Generates LiveView, templates, and context for a resource'
|
|
|
|
|
'phx.gen.notifier:Generates a notifier that delivers emails by default'
|
2017-11-01 13:23:14 +01:00
|
|
|
|
'phx.gen.presence:Generates a Presence tracker'
|
|
|
|
|
'phx.gen.schema:Generates an Ecto schema and migration file'
|
|
|
|
|
'phx.gen.secret:Generates a secret'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'phx.gen.socket:Generates a Phoenix socket handler'
|
|
|
|
|
'phx.new:Creates a new Phoenix application'
|
2017-11-01 13:23:14 +01:00
|
|
|
|
'phx.new.ecto:Creates a new Ecto project within an umbrella project'
|
|
|
|
|
'phx.new.web:Creates a new Phoenix web project within an umbrella project'
|
|
|
|
|
'phx.routes:Prints all routes'
|
|
|
|
|
'phx.server:Starts applications and their servers'
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'profile.cprof:Profiles the given file or expression with cprof'
|
|
|
|
|
'profile.eprof:Profiles the given file or expression with eprof'
|
|
|
|
|
'profile.fprof:Profiles the given file or expression with fprof'
|
|
|
|
|
'release:Assembles a self-contained release'
|
|
|
|
|
'release.init:Generates sample files for releases'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'run:Run the given file or expression'
|
|
|
|
|
"test:Run a project's tests"
|
2024-08-21 17:50:42 +02:00
|
|
|
|
"test.watch:Run a project's tests continuously using hex package mix_test_watch"
|
2021-10-26 16:07:46 +02:00
|
|
|
|
'test.coverage:Build report from exported test coverage'
|
|
|
|
|
'xref:Prints cross reference information'
|
2013-07-20 05:19:11 +02:00
|
|
|
|
'--help:Describe available tasks'
|
|
|
|
|
'--version:Prints the Elixir version information'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
__task_list ()
|
|
|
|
|
{
|
|
|
|
|
local expl
|
|
|
|
|
declare -a tasks
|
|
|
|
|
|
2024-08-21 17:50:42 +02:00
|
|
|
|
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.watch test.coverage xref)
|
2013-07-20 05:19:11 +02:00
|
|
|
|
|
|
|
|
|
_wanted tasks expl 'help' compadd $tasks
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local expl
|
|
|
|
|
|
|
|
|
|
local curcontext="$curcontext" state line
|
|
|
|
|
typeset -A opt_args
|
|
|
|
|
|
|
|
|
|
_arguments -C \
|
|
|
|
|
':command:->command' \
|
|
|
|
|
'*::options:->options'
|
|
|
|
|
|
|
|
|
|
case $state in
|
|
|
|
|
(command)
|
|
|
|
|
_describe -t commands "mix subcommand" _1st_arguments
|
|
|
|
|
return
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
(options)
|
|
|
|
|
case $line[1] in
|
|
|
|
|
(help)
|
2015-04-30 13:03:31 +02:00
|
|
|
|
_arguments ':feature:__task_list'
|
2016-04-20 17:09:52 +02:00
|
|
|
|
;;
|
|
|
|
|
(test)
|
|
|
|
|
_files
|
|
|
|
|
;;
|
2024-08-21 17:50:42 +02:00
|
|
|
|
(test.watch)
|
|
|
|
|
_files
|
|
|
|
|
;;
|
2016-12-17 22:32:53 +01:00
|
|
|
|
(run)
|
|
|
|
|
_files
|
|
|
|
|
;;
|
2013-07-20 05:19:11 +02:00
|
|
|
|
esac
|
|
|
|
|
;;
|
|
|
|
|
esac
|