_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. "run: [default] Run this project in local development mode."
  14. "debug: Run the project, but suspend the server process for debugging."
  15. "create: Create a new project."
  16. "update: Upgrade this project's dependencies to their latest versions."
  17. "add: Add a package to this project."
  18. "remove: Remove a package from this project."
  19. "list: List the packages explicitly used by your project."
  20. "add-platform: Add a platform to this project."
  21. "remove-platform: Remove a platform from this project."
  22. "list-platforms: List the platforms added to your project."
  23. "build: Build this project for all platforms."
  24. "lint: Build this project and run the linters printing all errors and warnings."
  25. "shell: Launch a Node REPL for interactively evaluating server-side code."
  26. "mongo: Connect to the Mongo database for the specified site."
  27. "reset: Reset the project state. Erases the local database."
  28. "deploy: Deploy this project to Meteor."
  29. "logs: Show logs for specified site."
  30. "authorized: View or change authorized users and organizations for a site."
  31. "claim: Claim a site deployed with an old Meteor version."
  32. "login: Log in to your Meteor developer account."
  33. "logout: Log out of your Meteor developer account."
  34. "whoami: Prints the username of your Meteor developer account."
  35. "test-packages: Test one or more packages."
  36. "admin: Administrative commands."
  37. "list-sites: List sites for which you are authorized."
  38. "publish-release: Publish a new meteor release to the package server."
  39. "publish: Publish a new version of a package to the package server."
  40. "publish-for-arch: Builds an already-published package for a new platform."
  41. "search: Search through the package server database."
  42. "show: Show detailed information about a release or package."
  43. "install-sdk:Installs SDKs for a platform."
  44. "configure-android:Run the Android configuration tool from Meteor’s ADK environment."
  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