Skip to content

Instantly share code, notes, and snippets.

@brandon-beacher
Created October 18, 2012 17:29
Show Gist options
  • Save brandon-beacher/3913522 to your computer and use it in GitHub Desktop.
Save brandon-beacher/3913522 to your computer and use it in GitHub Desktop.
#compdef rake
if [[ -f Rakefile ]]; then
local recent=$(ls -t .rake_tasks~ Rakefile **/*.rake | head -n 1)
if [[ $recent != .rake_tasks~ ]]; then
rake --tasks | cut -d ' ' -f 2 > .rake_tasks~
fi
compadd $(cat .rake_tasks~)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment