_capistrano 294 Bytes
Newer Older
Reza's avatar
Reza committed
1
2
3
#compdef cap
#autoload

RomainBelorgey's avatar
RomainBelorgey committed
4
if [[ -f config/deploy.rb || -f Capfile ]]; then
5
  if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
Reza's avatar
Reza committed
6
    echo "\nGenerating .cap_tasks~..." > /dev/stderr
7
    cap -v --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~
Reza's avatar
Reza committed
8
9
10
  fi
  compadd `cat .cap_tasks~`
fi