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