Skip to content

Instantly share code, notes, and snippets.

@jacobat
Created March 29, 2012 09:39
Show Gist options
  • Save jacobat/2235434 to your computer and use it in GitHub Desktop.
Save jacobat/2235434 to your computer and use it in GitHub Desktop.
Fast rake completion with zsh
#compdef rake
if [[ -f Rakefile ]]; then
sum=`md5 -q Rakefile **/*.rake | md5`
if [[ ! -f .rake_tasks.$sum~ ]]; then
rake -s --tasks | cut -d ' ' -f 2 > .rake_tasks.$sum~
fi
compadd $(cat .rake_tasks.$sum~)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment