_capistrano 291 B

12345678910
  1. #compdef cap
  2. #autoload
  3. if [[ -f config/deploy.rb || -f Capfile ]]; then
  4. if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
  5. echo "\nGenerating .cap_tasks~..." > /dev/stderr
  6. cap --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~
  7. fi
  8. compadd `cat .cap_tasks~`
  9. fi