2011-08-16 20:54:47 +00:00
|
|
|
#compdef cap
|
|
|
|
#autoload
|
|
|
|
|
2013-03-01 17:33:38 +00:00
|
|
|
if [[ -f config/deploy.rb || -f Capfile ]]; then
|
2012-09-03 16:50:45 +00:00
|
|
|
if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
|
2011-08-16 20:54:47 +00:00
|
|
|
echo "\nGenerating .cap_tasks~..." > /dev/stderr
|
2013-07-23 08:52:44 +00:00
|
|
|
cap -v --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~
|
2011-08-16 20:54:47 +00:00
|
|
|
fi
|
|
|
|
compadd `cat .cap_tasks~`
|
|
|
|
fi
|