gulp.plugin.zsh 513 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env zsh
  2. #
  3. # gulp-autocompletion-zsh
  4. #
  5. # Autocompletion for your gulp.js tasks
  6. #
  7. # Copyright(c) 2014 André König <andre.koenig@posteo.de>
  8. # MIT Licensed
  9. #
  10. #
  11. # André König
  12. # GitHub: https://github.com/akoenig
  13. # Twitter: https://twitter.com/caiifr
  14. #
  15. #
  16. # Grabs all available tasks from the `gulpfile.js`
  17. # in the current directory.
  18. #
  19. function _gulp_completion {
  20. compls=$(gulp --tasks-simple 2>/dev/null)
  21. completions=(${=compls})
  22. compadd -- $completions
  23. }
  24. compdef _gulp_completion gulp