File tree 1 file changed +5
-2
lines changed
packages/angular-cli/utilities
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ set_opts='--global -g'
18
18
test_opts=' --browsers --build --colors --log-level --port --reporters --watch -w'
19
19
version_opts=' --verbose'
20
20
21
- if type complete & > /dev/null; then
21
+ if test " . $( type -t complete 2 > /dev/null || true ) " = " .builtin " ; then
22
22
_ng_completion () {
23
23
local cword pword opts
24
24
@@ -47,7 +47,7 @@ if type complete &>/dev/null; then
47
47
}
48
48
49
49
complete -o default -F _ng_completion ng
50
- elif type compctl & > /dev/null; then
50
+ elif test " . $( type -w compctl 2 > /dev/null || true ) " = " .compctl: builtin " ; then
51
51
_ng_completion () {
52
52
local words cword opts
53
53
read -Ac words
@@ -75,6 +75,9 @@ elif type compctl &>/dev/null; then
75
75
}
76
76
77
77
compctl -K _ng_completion ng
78
+ else
79
+ echo " Shell builtin command 'complete' or 'compctl' is redefined; cannot perform ng completion."
80
+ return 1
78
81
fi
79
82
80
83
# ##-end-ng-completion###
You can’t perform that action at this time.
0 commit comments