123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- #compdef ember
- local curcontext="$curcontext" state line ret=1
- _arguments -C -A "--version" -A "--help" \
- '(- 1 *)--help' \
- '(- 1 *)--version' \
- '1: :->cmds' \
- '*:: :->args' && ret=0
- case $state in
- cmds)
- _values "ember command" \
- "addon[Generates a new folder structure for building an addon, complete with test harness]" \
- "asset-sizes[Shows the sizes of your asset files]" \
- "build[Builds your app and places it into the output path (dist/ by default)]" \
- "destroy[Destroys code generated by generate command]" \
- "generate[Generates new code from blueprints]" \
- "help[Outputs the usage instructions for all commands or the provided command]" \
- "init[Creates a new ember-cli project in the current folder]" \
- "install[Installs an ember-cli addon from npm]" \
- "new[Creates a new directory and runs ember init in it]" \
- "serve[Builds and serves your app, rebuilding on file changes]" \
- "test[Runs your app's test suite]" \
- "version[outputs ember-cli version]"
- ret=0
- ;;
- args)
- case $line[1] in
- help)
- _values 'commands' \
- 'addon' \
- 'asset-sizes' \
- 'build' \
- 'destroy' \
- 'generate' \
- 'help' \
- 'init' \
- 'install' \
- 'new' \
- 'serve' \
- 'test' \
- 'vesion' && ret=0
- ;;
- addon)
- _arguments \
- '(--blueprint)--blueprint=-' \
- '(--directory)--directory=-' \
- '(--dry-run)--dry-run' \
- '(--skip-bower)--skip-bower' \
- '(--skip-git)--skip-git' \
- '(--skip-npm)--skip-npm' \
- '(--verbose)--verbose'
- ;;
- asset-sizes)
- _arguments \
- '(--output-path)--output-path=-'
- ;;
- build)
- _arguments \
- '(--environment)--environment=-' \
- '(--output-path)--output-path=-' \
- '(--output-path)--suppress-sizes' \
- '(--watch)--watch' \
- '(--watcher)--watcher=-' \
- '(-dev)-dev' \
- '(-prod)-prod'
- ;;
- destroy|generate)
- _values 'arguments' \
- '(--classic)--classic' \
- '(--dry-run)--dry-run' \
- '(--dummy)--dummy' \
- '(--in-repo-addon)--in-repo-addon-=' \
- '(--pod)--pod' \
- '(--verbose)--verbose' && ret=0
- _values 'blueprints' \
- 'acceptance-test' \
- 'adapter' \
- 'adapter-test' \
- 'component' \
- 'component-addon' \
- 'component-test' \
- 'controller' \
- 'controller-test' \
- 'helper' \
- 'helper-addon' \
- 'helper-test' \
- 'initializer' \
- 'initializer-addon' \
- 'initializer-test' \
- 'instance-initializer' \
- 'instance-initializer-addon' \
- 'instance-initializer-test' \
- 'mixin' \
- 'mixin-test' \
- 'model' \
- 'model-test' \
- 'resource' \
- 'route' \
- 'route-addon' \
- 'route-test' \
- 'serializer' \
- 'serializer-test' \
- 'service' \
- 'service-test' \
- 'template' \
- 'test-helper' \
- 'transform' \
- 'transform-test' \
- 'util' \
- 'util-test' \
- 'view' \
- 'view-test' \
- 'addon' \
- 'addon-import' \
- 'app' \
- 'blueprint' \
- 'http-mock' \
- 'http-proxy' \
- 'in-repo-addon' \
- 'lib' \
- 'server' \
- 'vendor-shim' && ret=0
- ;;
- init)
- _arguments \
- '(--blueprint)--blueprint=-' \
- '(--name)--name=-' \
- '(--dry-run)--dry-run' \
- '(--skip-bower)--skip-bower' \
- '(--skip-npm)--skip-npm' \
- '(--verbose)--verbose'
- ;;
- install)
- _arguments \
- '(--save-dev)--save-dev' \
- '(--save)--save'
- ;;
- new)
- _arguments \
- '(--blueprint)--blueprint=-' \
- '(--directory)--directory=-' \
- '(--dry-run)--dry-run' \
- '(--skip-bower)--skip-bower' \
- '(--skip-git)--skip-git' \
- '(--skip-npm)--skip-npm' \
- '(--verbose)--verbose'
- ;;
- serve)
- _arguments \
- '(--port)--port=-[To use a port different than 4200. Pass 0 to automatically pick an available port.]' \
- '(--host)--host=-[Listens on all interfaces by default]' \
- '(--proxy)--proxy=-' \
- '(--secure-proxy)--secure-proxy[Set to false to proxy self-signed SSL certificates]' \
- '(--transparent-proxy)--transparent-proxy[Set to false to omit x-forwarded-* headers when proxying]' \
- '(--watcher)--watcher=-' \
- '(--live-reload)--live-reload' \
- '(--live-reload-host)--live-reload-host=-[Defaults to host]' \
- '(--live-reload-base-url)--live-reload-base-url=-[Defaults to baseURL]' \
- '(--live-reload-port)--live-reload-port=-[Defaults to port number within \[49152...65535\]]' \
- '(--environment)--environment=-' \
- '(--output-path)--output-path=-' \
- '(--ssl)--ssl' \
- '(--ssl-key)--ssl-key=-' \
- '(--ssl-cert)--ssl-cert=-'
- ;;
- test)
- _arguments \
- '(--environment)--environment=-' \
- '(--config-file)--config-file=-' \
- '(--server)--server' \
- '(--host)--host=-' \
- '(--test-port)--test-port=-[The test port to use when running with --server.]' \
- '(--filter)--filter=-[A string to filter tests to run]' \
- '(--module)--module=-[The name of a test module to run]' \
- '(--watcher)--watcher=-' \
- '(--launch)--launch=-[A comma separated list of browsers to launch for tests.]' \
- '(--reporter)--reporter=-[Test reporter to use \[tap|dot|xunit\] (default: tap)]' \
- '(--silent)--silent[Suppress any output except for the test report]' \
- '(--test-page)--test-page=-[Test page to invoke]' \
- '(--path)--path=-[Reuse an existing build at given path.]' \
- '(--query)--query=-[A query string to append to the test page URL.]'
- ;;
- esac
- ;;
- esac
- return ret
|