forked from lowks/pythonpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpycompletion.sh
More file actions
70 lines (63 loc) · 1.49 KB
/
pycompletion.sh
File metadata and controls
70 lines (63 loc) · 1.49 KB
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
62
63
64
65
66
67
68
69
70
_py()
{
COMPREPLY=($(pycompleter "${COMP_WORDS[@]}" 2>/dev/null ))
if [[ ${COMPREPLY[0]} == '_longopt' ]]; then
COMPREPLY=()
_longopt 2>/dev/null
fi
}
_py2()
{
COMPREPLY=($(pycompleter2 "${COMP_WORDS[@]}" 2>/dev/null ))
if [[ ${COMPREPLY[0]} == '_longopt' ]]; then
COMPREPLY=()
_longopt 2>/dev/null
fi
}
_py2.6()
{
COMPREPLY=($(pycompleter2.6 "${COMP_WORDS[@]}" 2>/dev/null ))
if [[ ${COMPREPLY[0]} == '_longopt' ]]; then
COMPREPLY=()
_longopt 2>/dev/null
fi
}
_py2.7()
{
COMPREPLY=($(pycompleter2.7 "${COMP_WORDS[@]}" 2>/dev/null ))
if [[ ${COMPREPLY[0]} == '_longopt' ]]; then
COMPREPLY=()
_longopt 2>/dev/null
fi
}
_py3()
{
COMPREPLY=($(pycompleter3 "${COMP_WORDS[@]}" 2>/dev/null ))
if [[ ${COMPREPLY[0]} == '_longopt' ]]; then
COMPREPLY=()
_longopt 2>/dev/null
fi
}
_py3.3()
{
COMPREPLY=($(pycompleter3.3 "${COMP_WORDS[@]}" 2>/dev/null ))
if [[ ${COMPREPLY[0]} == '_longopt' ]]; then
COMPREPLY=()
_longopt 2>/dev/null
fi
}
_py3.4()
{
COMPREPLY=($(pycompleter3.4 "${COMP_WORDS[@]}" 2>/dev/null ))
if [[ ${COMPREPLY[0]} == '_longopt' ]]; then
COMPREPLY=()
_longopt 2>/dev/null
fi
}
complete -F _py -o nospace py
complete -F _py2 -o nospace py2
complete -F _py2.6 -o nospace py2.6
complete -F _py2.7 -o nospace py2.7
complete -F _py3 -o nospace py3
complete -F _py3.3 -o nospace py3.3
complete -F _py3.4 -o nospace py3.4