-
Notifications
You must be signed in to change notification settings - Fork 0
/
tnsrc
61 lines (61 loc) · 1.97 KB
/
tnsrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
###-begin-tns-completion-###
if complete &>/dev/null; then
_tns_completion () {
local si="$IFS"
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
tns completion -- "${COMP_WORDS[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
complete -F _tns_completion -o default tns
elif compctl &>/dev/null; then
_tns_completion () {
local cword line point words si
read -Ac words
read -cn cword
let cword-=1
read -l line
read -ln point
si="$IFS"
IFS=$'\n' reply=($(COMP_CWORD="$cword" \
COMP_LINE="$line" \
COMP_POINT="$point" \
tns completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
compctl -K _tns_completion -f tns
fi
###-end-tns-completion-######-begin-nativescript-completion-###
if complete &>/dev/null; then
_nativescript_completion () {
local si="$IFS"
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
nativescript completion -- "${COMP_WORDS[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
complete -F _nativescript_completion -o default nativescript
elif compctl &>/dev/null; then
_nativescript_completion () {
local cword line point words si
read -Ac words
read -cn cword
let cword-=1
read -l line
read -ln point
si="$IFS"
IFS=$'\n' reply=($(COMP_CWORD="$cword" \
COMP_LINE="$line" \
COMP_POINT="$point" \
nativescript completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
compctl -K _nativescript_completion -f nativescript
fi
###-end-nativescript-completion-###