Commit graph

4 commits

Author SHA1 Message Date
Justin Puah
39b0bf20f2 Dynamic generation of mix commands for zsh completion.
I wrote my own zsh completion file for mix today. I realised that depending on the project the mix tasks can change because of dependencies like phoenix or ecto.
E.g. usually you wouldn't have 'mix phoenix.server' except in the project directory for a phoenix web app.
This is my solution for "dynamic" generation of the _1st_arguments:
So, I replaced most of the _1st_arguments with just 

    "${(@f)$(mix help | egrep "^mix " | tail -n+2 | sed 's/^mix //;s/\s\+#\s/:/')}"

The above line will allow the zsh user to autocomplete all available mix tasks. I just finished this and thought I should submit it for other oh-my-zsh users.
2015-11-09 18:13:44 +11:00
Mikhail S. Pobolovets
1f008b4113 Update Mix complition upto 1.0.4
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2015-06-11 21:10:55 +02:00
Craig Paterson
8ce1245770 added the 'mix local.hex' command to plugin completions 2015-02-19 17:55:32 +02:00
John Warwick
4b8e109584 Added autocompletion support for Elixir mix command 2013-07-19 23:19:11 -04:00