2013-09-01 16:20:08 +00:00
|
|
|
#compdef meteor
|
|
|
|
#autoload
|
|
|
|
|
|
|
|
# Meteor Autocomplete plugin for Oh-My-Zsh, based on homebrew completion
|
|
|
|
# Original author: Dimitri JORGE (https://github.com/jorge-d)
|
2014-12-21 11:07:03 +00:00
|
|
|
# Maintainer: Vianney Lecroart (https://github.com/acemtp)
|
2013-09-01 16:20:08 +00:00
|
|
|
|
2013-09-01 17:23:21 +00:00
|
|
|
_meteor_installed_packages() {
|
2014-12-21 11:07:03 +00:00
|
|
|
installed_packages=(`meteor list | cut -d" " -f1`)
|
2013-09-01 17:23:21 +00:00
|
|
|
}
|
|
|
|
|
2013-09-01 16:20:08 +00:00
|
|
|
local -a _1st_arguments
|
|
|
|
_1st_arguments=(
|
2014-12-21 11:07:03 +00:00
|
|
|
'run:[default] Run this project in local development mode.'
|
|
|
|
'debug:Run the project, but suspend the server process for debugging.'
|
|
|
|
'create:Create a new project.'
|
2014-12-21 11:18:31 +00:00
|
|
|
'update:Upgrade this project\'s dependencies to their latest versions.'
|
2014-12-21 11:07:03 +00:00
|
|
|
'add:Add a package to this project.'
|
|
|
|
'remove:Remove a package from this project.'
|
|
|
|
'list:List the packages explicitly used by your project.'
|
|
|
|
'add-platform:Add a platform to this project.'
|
|
|
|
'install-sdk:Installs SDKs for a platform.'
|
|
|
|
'remove-platform:Remove a platform from this project.'
|
|
|
|
'list-platforms:List the platforms added to your project.'
|
2014-12-21 11:18:31 +00:00
|
|
|
'configure-android:Run the Android configuration tool from Meteor\'s ADK environment.'
|
2014-12-21 11:07:03 +00:00
|
|
|
'build:Build this project for all platforms.'
|
|
|
|
'shell:Launch a Node REPL for interactively evaluating server-side code.'
|
|
|
|
'mongo:Connect to the Mongo database for the specified site.'
|
2013-09-01 16:20:08 +00:00
|
|
|
'reset:Reset the project state. Erases the local database.'
|
2014-12-21 11:07:03 +00:00
|
|
|
'deploy:Deploy this project to Meteor.'
|
|
|
|
'logs:Show logs for specified site.'
|
|
|
|
'authorized:View or change authorized users and organizations for a site.'
|
|
|
|
'claim:Claim a site deployed with an old Meteor version.'
|
|
|
|
'login:Log in to your Meteor developer account.'
|
|
|
|
'logout:Log out of your Meteor developer account.'
|
|
|
|
'whoami:Prints the username of your Meteor developer account.
|
|
|
|
'test-packages:Test one or more packages.'
|
|
|
|
'list-sites:List sites for which you are authorized.'
|
|
|
|
'publish-release:Publish a new meteor release to the package server.'
|
|
|
|
'publish:Publish a new version of a package to the package server.'
|
|
|
|
'publish-for-arch:Builds an already-published package for a new platform.'
|
|
|
|
'search:Search through the package server database.'
|
|
|
|
'show:Show detailed information about a release or package.'
|
2013-09-01 16:20:08 +00:00
|
|
|
)
|
|
|
|
|
2013-09-01 17:23:21 +00:00
|
|
|
local expl
|
|
|
|
local -a packages installed_packages
|
|
|
|
|
2013-09-01 16:20:08 +00:00
|
|
|
if (( CURRENT == 2 )); then
|
|
|
|
_describe -t commands "meteor subcommand" _1st_arguments
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
case "$words[2]" in
|
|
|
|
help)
|
2013-09-01 17:23:21 +00:00
|
|
|
_describe -t commands "meteor subcommand" _1st_arguments ;;
|
|
|
|
remove)
|
|
|
|
_meteor_installed_packages
|
|
|
|
_wanted installed_packages expl 'installed packages' compadd -a installed_packages ;;
|
2013-09-01 16:20:08 +00:00
|
|
|
esac
|