This script caches the output for later usage and significantly speeds it up.
It generates a .mix_tasks cache file for current project. Currently if you want
to update cache you should remove .mix_tasks file
Inspired by and based on rake-fast zsh plugin.
This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-mix-task-completion-for-zsh/).
## Installation
Just add the plugin to your `.zshrc`:
```bash
plugins=(foo bar mix-fast)
```
You might consider adding `.mix_tasks` to your [global .gitignore](https://help.github.com/articles/ignoring-files#global-gitignore)
## Usage
`mix`, then press tab
Currently maintained by [styx](https://github.com/styx/)
'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'
'compile:Compile source files'
'compile:Compile source files'
'compile.protocols:Consolidates all protocols in all paths'
'deps:List dependencies and their status'
'deps:List dependencies and their status'
"deps.clean:Remove dependencies' files"
"deps.clean:Remove the given dependencies' files"
'deps.compile:Compile dependencies'
'deps.compile:Compile dependencies'
'deps.get:Get all out of date dependencies'
'deps.get:Get all out of date dependencies'
'deps.unlock:Unlock the given dependencies'
'deps.unlock:Unlock the given dependencies'
'deps.update:Update dependencies'
'deps.update:Update the given dependencies'
'do:Executes the commands separated by comma'
'do:Executes the tasks separated by comma'
'escriptize:Generates an escript for the project'
'escript.build:Builds an escript for the project'
'help:Print help information for tasks'
'help:Print help information for tasks'
'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'
'local:List local tasks'
'local:List local tasks'
'local.install:Install a task or an archive locally'
'local.hex:Install hex locally'
'local.rebar:Install rebar locally'
'local.rebar:Install rebar locally'
'local.uninstall:Uninstall local tasks or archives'
'new:Create a new Elixir project'
'new:Creates a new Elixir project'
'run:Run the given file or expression'
'run:Run the given file or expression'
"test:Run a project's tests"
"test:Run a project's tests"
'--help:Describe available tasks'
'--help:Describe available tasks'
...
@@ -33,7 +49,7 @@ __task_list ()
...
@@ -33,7 +49,7 @@ __task_list ()
local expl
local expl
declare -a tasks
declare -a tasks
tasks=(archive clean compile deps deps.clean deps.compile deps.get deps.unlock deps.update do escriptize help local local.install local.rebar local.uninstall new run test)
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)
tell application "System Events" to perform action "AXPress" of (menu item "${state}" of menu "Shuffle" of menu item "Shuffle" of menu "Controls" of menu bar item "Controls" of menu bar 1 of application process "iTunes" )
EOF
return 0
;;
toggle|*)
osascript 1>/dev/null 2>&1 <<-EOF
tell application "System Events" to perform action "AXPress" of (button 2 of process "iTunes"'s window "iTunes"'s scroll area 1)
EOF
return 0
;;
esac
;;
""|-h|--help)
""|-h|--help)
echo"Usage: itunes <option>"
echo"Usage: itunes <option>"
echo"option:"
echo"option:"
echo"\tlaunch|play|pause|stop|rewind|resume|quit"
echo"\tlaunch|play|pause|stop|rewind|resume|quit"
echo"\tmute|unmute\tcontrol volume set"
echo"\tmute|unmute\tcontrol volume set"
echo"\tnext|previous\tplay next or previous track"
echo"\tnext|previous\tplay next or previous track"
echo"\tshuf|shuffle [on|off|toggle]\tSet shuffled playback. Default: toggle. Note: toggle doesn't support the MiniPlayer."
echo"\tvol\tSet the volume, takes an argument from 0 to 100"