ogroup-opts
1.79 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
# Options read by onos-group for help message formatting and sanity checks.
GOPTS='install kill patch-vm push-keys uninstall'
# Tab completion settings for onos-group.
function _ogroup-opts () {
local cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "${GOPTS} help" -- $cur ) )
fi
}
complete -F _ogroup-opts onos-group
# Tab completion settings for stc
function _stc-opts () {
local cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/scenarios && ls -1 | sed 's/.xml//g')" -- $cur ) )
fi
}
complete -F _stc-opts stc
# Tab completion settings for stl
function _stl-opts () {
local cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "$(cd /tmp/stc && ls -1)" -- $cur ) )
elif [ $COMP_CWORD -eq 2 ]; then
COMPREPLY=( $( compgen -W "$(cd /tmp/stc/$3 && ls -1)" -- $cur ) )
fi
}
complete -F _stl-opts stl
# Tab completion settings for cell
function _cell-opts () {
local cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/cells && ls -1) borrow return status" -- $cur ) )
fi
}
complete -F _cell-opts cell vicell
# Tab completion settings for topo recipes
function _topo-opts () {
local cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/topos && ls -1 *.recipe | sed 's/\.recipe//g')" -- $cur ) )
fi
}
complete -F _topo-opts topo
# Tab completion settings for onos-create-app.
function _ocapp-opts () {
local cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "app bundle ui uitab uitopo cli rest" -- $cur ) )
fi
}
complete -F _ocapp-opts onos-create-app