1- # ##-begin-ng-completion###
1+ # ##-begin-ng-completion###
22#
33# ng command completion script
44#
55# Installation: ng completion >> ~/.bashrc (or ~/.zshrc)
66#
77
8- ng_opts=' new init build serve generate autocomplete e2e lint test version'
9- init_opts=' --dry-run --verbose --blueprint --skip-npm --skip-bower --name'
10- new_opts=' --dry-run --verbose --blueprint --skip-npm --skip-bower --skip-git --directory'
11- build_opts=' --environment --output-path --watch --watcher'
12- serve_opts=' --port --host --proxy --insecure-proxy --watcher --live-reload --live-reload-host
13- --live-reload-port --environment --output-path --ssl --ssl-key --ssl-cert'
14- generate_opts=' component directive pipe route service'
15- test_opts=' --watch --browsers --colors --log-level --port --reporters'
8+ ng_opts=' b build completion doc e2e g generate get github-pages:deploy gh-pages:deploy h help i init install lint make-this-awesome new s serve server set t test v version -h --help'
9+
10+ build_opts=' --environment --output-path --suppress-sizes --target --watch --watcher -dev -e -prod'
11+ generate_opts=' class component directive enum module pipe route service --generate -d --dry-run --verbose -v --pod -p --classic -c --dummy -dum -id --in-repo --in-repo-addon -ir'
12+ github_pages_deploy_opts=' --environment --gh-token --gh-username --skip-build --user-page --message'
13+ help_opts=' --json --verbose -v'
14+ init_opts=' --blueprint --dry-run --link-cli --mobile --name --prefix --skip-bower --skip-npm --source-dir --style --verbose -b -d -lc -n -p -sb -sd -sn -v'
15+ new_opts=' --blueprint --directory --dry-run --link-cli --mobile --prefix --skip-bower --skip-git --skip-npm --source-dir --style --verbose -b -d -dir -lc -p -sb -sd -sg -sn -v'
16+ serve_opts=' --environment --host --insecure-proxy --inspr --live-reload --live-reload-base-url --live-reload-host --live-reload-live-css --live-reload-port --output-path --port --proxy --ssl --ssl-cert --ssl-key --target --watcher -H -dev -e -lr -lrbu -lrh -lrp -op -out -p -pr -prod -pxy -t -w'
17+ set_opts=' --global -g'
18+ test_opts=' --browsers --colors --config-file --environment --filter --host --launch --log-level --module --path --port --query --reporter --server --silent --test-page --test-port --watch -H -c -cf -e -f -m -r -s -tp -w'
19+ version_opts=' --verbose'
1620
1721if type complete & > /dev/null; then
1822 _ng_completion () {
@@ -24,18 +28,23 @@ if type complete &>/dev/null; then
2428
2529 case ${pword} in
2630 ng) opts=$ng_opts ;;
27- i|init) opts=$init_opts ;;
28- new) opts=$new_opts ;;
2931 b|build) opts=$build_opts ;;
30- s|serve|server) opts=$serve_opts ;;
3132 g|generate) opts=$generate_opts ;;
32- test) opts=$test_opts ;;
33+ h|help|-h|--help) opts=$help_opts ;;
34+ init) opts=$init_opts ;;
35+ new) opts=$new_opts ;;
36+ s|serve|server) opts=$serve_opts ;;
37+ set) opts=$set_opts ;;
38+ t|test) opts=$test_opts ;;
39+ v|version) opts=$version_opts ;;
40+ * ) opts=' ' ;;
3341 esac
3442
3543 COMPREPLY=( $( compgen -W ' ${opts}' -- $cword ) )
3644
3745 return 0
3846 }
47+
3948 complete -o default -F _ng_completion ng
4049elif type compctl & > /dev/null; then
4150 _ng_completion () {
@@ -46,18 +55,24 @@ elif type compctl &>/dev/null; then
4655
4756 case $words [cword] in
4857 ng) opts=$ng_opts ;;
49- i|init) opts=$init_opts ;;
50- new) opts=$new_opts ;;
5158 b|build) opts=$build_opts ;;
52- s|serve|server) opts=$serve_opts ;;
5359 g|generate) opts=$generate_opts ;;
54- test) opts=$test_opts ;;
60+ h|help|-h|--help) opts=$help_opts ;;
61+ init) opts=$init_opts ;;
62+ new) opts=$new_opts ;;
63+ s|serve|server) opts=$serve_opts ;;
64+ set) opts=$set_opts ;;
65+ t|test) opts=$test_opts ;;
66+ v|version) opts=$version_opts ;;
67+ * ) opts=' ' ;;
5568 esac
56-
69+
5770 setopt shwordsplit
5871 reply=($opts )
5972 unset shwordsplit
6073 }
74+
6175 compctl -K _ng_completion ng
6276fi
77+
6378# ##-end-ng-completion###
0 commit comments