Blame view

plugins/mix/_mix 2.47 KB
238d8e65a   mj   Squashed 'repos/r...
1
  #compdef mix
093a6c34b   mj   Squashed 'repos/r...
2
3
4
5
6
7
  #autoload
  
  # Elixir mix zsh completion
  
  local -a _1st_arguments
  _1st_arguments=(
238d8e65a   mj   Squashed 'repos/r...
8
9
10
11
12
13
14
      'app.start:Start all registered apps'
      'archive:List all archives'
      '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'
093a6c34b   mj   Squashed 'repos/r...
15
      'compile:Compile source files'
238d8e65a   mj   Squashed 'repos/r...
16
      'compile.protocols:Consolidates all protocols in all paths'
093a6c34b   mj   Squashed 'repos/r...
17
      'deps:List dependencies and their status'
238d8e65a   mj   Squashed 'repos/r...
18
      "deps.clean:Remove the given dependencies' files"
093a6c34b   mj   Squashed 'repos/r...
19
20
21
      'deps.compile:Compile dependencies'
      'deps.get:Get all out of date dependencies'
      'deps.unlock:Unlock the given dependencies'
238d8e65a   mj   Squashed 'repos/r...
22
23
24
      'deps.update:Update the given dependencies'
      'do:Executes the tasks separated by comma'
      'escript.build:Builds an escript for the project'
093a6c34b   mj   Squashed 'repos/r...
25
      'help:Print help information for tasks'
238d8e65a   mj   Squashed 'repos/r...
26
27
28
29
30
31
32
33
34
35
36
      'hex:Print hex help information'
      'hex.config:Read or update hex config'
      'hex.docs:Publish docs for package'
      'hex.info:Print hex information'
      'hex.key:Hex API key tasks'
      'hex.outdated:Shows outdated hex deps for the current project'
      'hex.owner:Hex package ownership tasks'
      'hex.publish:Publish a new package version'
      'hex.search:Search for package names'
      'hex.user:Hex user tasks'
      'loadconfig:Loads and persists the given configuration'
093a6c34b   mj   Squashed 'repos/r...
37
      'local:List local tasks'
238d8e65a   mj   Squashed 'repos/r...
38
      'local.hex:Install hex locally'
093a6c34b   mj   Squashed 'repos/r...
39
      'local.rebar:Install rebar locally'
238d8e65a   mj   Squashed 'repos/r...
40
      'new:Create a new Elixir project'
093a6c34b   mj   Squashed 'repos/r...
41
42
43
44
45
46
47
48
49
50
      'run:Run the given file or expression'
      "test:Run a project's tests"
      '--help:Describe available tasks'
      '--version:Prints the Elixir version information'
  )
  
  __task_list ()
  {
      local expl
      declare -a tasks
238d8e65a   mj   Squashed 'repos/r...
51
      tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new run test)
093a6c34b   mj   Squashed 'repos/r...
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  
      _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)
238d8e65a   mj   Squashed 'repos/r...
74
           _arguments ':feature:__task_list'
093a6c34b   mj   Squashed 'repos/r...
75
76
77
      esac
    ;;
  esac