_meteor 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #compdef meteor
  2. #autoload
  3. # Meteor Autocomplete plugin for Oh-My-Zsh, based on homebrew completion
  4. # Original author: Dimitri JORGE (https://github.com/jorge-d)
  5. _meteor_all_packages() {
  6. packages=(`meteor list | cut -d" " -f1`)
  7. }
  8. _meteor_installed_packages() {
  9. installed_packages=(`meteor list --using`)
  10. }
  11. local -a _1st_arguments
  12. _1st_arguments=(
  13. "add-platform:Add a platform to this project."
  14. "add:Add a package to this project."
  15. "admin:Administrative commands."
  16. "authorized:View or change authorized users and organizations for a site."
  17. "build:Build this project for all platforms."
  18. "claim:Claim a site deployed with an old Meteor version."
  19. "configure-android:Run the Android configuration tool from Meteor's ADK environment."
  20. "create:Create a new project."
  21. "debug:Run the project, but suspend the server process for debugging."
  22. "deploy:Deploy this project to Meteor."
  23. "install-sdk:Installs SDKs for a platform."
  24. "lint:Build this project and run the linters printing all errors and warnings."
  25. "list-platforms:List the platforms added to your project."
  26. "list-sites:List sites for which you are authorized."
  27. "list:List the packages explicitly used by your project."
  28. "login:Log in to your Meteor developer account."
  29. "logout:Log out of your Meteor developer account."
  30. "logs:Show logs for specified site."
  31. "mongo:Connect to the Mongo database for the specified site."
  32. "publish-for-arch:Builds an already-published package for a new platform."
  33. "publish-release:Publish a new meteor release to the package server."
  34. "publish:Publish a new version of a package to the package server."
  35. "remove-platform:Remove a platform from this project."
  36. "remove:Remove a package from this project."
  37. "reset:Reset the project state. Erases the local database."
  38. "run:[default] Run this project in local development mode."
  39. "search:Search through the package server database."
  40. "shell:Launch a Node REPL for interactively evaluating server-side code."
  41. "show:Show detailed information about a release or package."
  42. "test-packages:Test one or more packages."
  43. "update:Upgrade this project's dependencies to their latest versions."
  44. "whoami:Prints the username of your Meteor developer account."
  45. )
  46. local expl
  47. local -a packages installed_packages
  48. if (( CURRENT == 2 )); then
  49. _describe -t commands "meteor subcommand" _1st_arguments
  50. return
  51. fi
  52. case "$words[2]" in
  53. help)
  54. _describe -t commands "meteor subcommand" _1st_arguments ;;
  55. remove)
  56. _meteor_installed_packages
  57. _wanted installed_packages expl 'installed packages' compadd -a installed_packages ;;
  58. add)
  59. _meteor_all_packages
  60. _wanted packages expl 'all packages' compadd -a packages ;;
  61. esac