Parent directory

_meteor

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