1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
#compdef mix
#autoload
# ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for Elixir Mix
#
# Last updated: 18.04.2017
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Han Ngo (https://github.com/tieubao)
# * Teja Sophista (https://github.com/tejanium)
#
# ------------------------------------------------------------------------------
local -a _1st_arguments
_1st_arguments=(
'app.start:Starts all registered apps'
'app.tree:Prints the application tree'
'archive:Lists installed archives'
'archive.build:Archives this project into a .ez file'
'archive.install:Installs an archive locally'
'archive.uninstall:Uninstalls archives'
'clean:Deletes generated application files'
'cmd:Executes the given command'
'compile:Compiles source files'
'deps:Lists dependencies and their status'
"deps.clean:Deletes the given dependencies' files"
'deps.compile:Compiles dependencies'
'deps.get:Gets all out of date dependencies'
'deps.tree:Prints the dependency tree'
'deps.unlock:Unlocks the given dependencies'
'deps.update:Updates the given dependencies'
'do:Executes the tasks separated by comma'
'ecto:Prints Ecto help information'
'ecto.create:Creates the repository storage'
'ecto.drop:Drops the repository storage'
'ecto.dump:Dumps the repository database structure'
'ecto.gen.migration:Generates a new migration for the repo'
'ecto.gen.repo:Generates a new repository'
'ecto.load:Loads previously dumped database structure'
'ecto.migrate:Runs the repository migrations'
'ecto.migrations:Displays the repository migration status'
'ecto.rollback:Rolls back the repository migrations'
'escript:Lists installed escripts'
'escript.build:Builds an escript for the project'
'escript.install:Installs an escript locally'
'escript.uninstall:Uninstalls escripts'
'gettext.extract:Extracts translations from source code'
'gettext.merge:Merge template files into translation files'
'help:Prints help information for tasks'
'hex:Prints Hex help information'
'hex.build:Builds a new package version locally'
'hex.config:Reads, updates or deletes Hex config'
'hex.docs:Fetch or open documentation of a package'
'hex.info:Prints Hex information'
'hex.key:Manages Hex API key'
'hex.outdated:Shows outdated Hex deps for the current project'
'hex.owner:Manages Hex package ownership'
'hex.public_keys:Manages Hex public keys'
'hex.publish:Publishes a new package version'
'hex.retire:Retires a package version'
'hex.search:Searches for package names'
'hex.user:Registers or manages Hex user'
'loadconfig:Loads and persists the given configuration'
'local:Lists local tasks'
'local.hex:Installs Hex locally'
'local.phoenix:Updates Phoenix locally'
'local.phx:Updates the Phoenix project generator locally'
'local.public_keys:Manages public keys'
'local.rebar:Installs Rebar locally'
'new:Creates a new Elixir project'
'phoenix.gen.html:Generates controller, model and views for an HTML based resource'
'phoenix.server:Starts applications and their servers'
'phx.digest:Digests and compresses static files'
'phx.digest.clean:Removes old versions of static assets.'
'phx.gen.auth:Generates a flexible, pre-built authentication system'
'phx.gen.channel:Generates a Phoenix channel'
'phx.gen.context:Generates a context with functions around an Ecto schema'
'phx.gen.html:Generates controller, views, and context for an HTML resource'
'phx.gen.live:Generates controller, context and helper for a LiveView resource'
'phx.gen.json:Generates controller, views, and context for a JSON resource'
'phx.gen.presence:Generates a Presence tracker'
'phx.gen.schema:Generates an Ecto schema and migration file'
'phx.gen.secret:Generates a secret'
'phx.new:Creates a new Phoenix application'
'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'
'profile.fprof:Profiles the given file or expression with fprof'
'run:Runs the given file or expression'
"test:Runs a project's tests"
'xref:Performs cross reference checks'
'--help:Describe available tasks'
'--version:Prints the Elixir version information'
)
__task_list ()
{
local expl
declare -a tasks
tasks=(
'app.start'
'app.tree'
'archive'
'archive.build'
'archive.install'
'archive.uninstall'
'clean'
'cmd'
'compile'
'deps'
'deps.clean'
'deps.compile'
'deps.get'
'deps.tree'
'deps.unlock'
'deps.update'
'do'
'ecto'
'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'
'gettext.extract'
'gettext.merge'
'format'
'help'
'hex'
'hex.build'
'hex.config'
'hex.docs'
'hex.info'
'hex.key'
'hex.outdated'
'hex.owner'
'hex.public_keys'
'hex.publish'
'hex.retire'
'hex.search'
'hex.user'
'loadconfig'
'local'
'local.hex'
'local.public_keys'
'local.rebar'
'new'
'phoenix.gen.html'
'phoenix.server'
'phx.digest'
'phx.digest.clean'
'phx.gen.auth'
'phx.gen.channel'
'phx.gen.context'
'phx.gen.html'
'phx.gen.live'
'phx.gen.json'
'phx.gen.presence'
'phx.gen.schema'
'phx.gen.secret'
'phx.routes'
'phx.server'
'profile.fprof'
'run'
'test'
'xref'
)
_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)
_arguments ':feature:__task_list'
return
;;
(test|format|run)
_arguments ':PATH:_files'
return
;;
esac
;;
esac
|