Created
October 18, 2012 17:29
-
-
Save brandon-beacher/3913522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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