blob: fe35be2839e9d945b2ee3bd4d8fb16da39057286 [file] [log] [blame]
Ayaka Koshibe37cffe82015-06-01 12:01:23 -07001# Options read by onos-group for help message formatting and sanity checks.
2GOPTS='install kill patch-vm push-keys uninstall'
Ayaka Koshibeaec629622015-01-05 20:33:29 -08003
Thomas Vachuska4bfccd542015-05-30 00:35:25 -07004# Tab completion settings for onos-group.
Ayaka Koshibeaec629622015-01-05 20:33:29 -08005function _ogroup-opts () {
6 local cur=${COMP_WORDS[COMP_CWORD]}
Ayaka Koshibeaec629622015-01-05 20:33:29 -08007 if [ $COMP_CWORD -eq 1 ]; then
Ayaka Koshibe37cffe82015-06-01 12:01:23 -07008 COMPREPLY=( $( compgen -W "${GOPTS} help" -- $cur ) )
Ayaka Koshibeaec629622015-01-05 20:33:29 -08009 fi
10}
11
12complete -F _ogroup-opts onos-group
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070013
14
15# Tab completion settings for stc
16function _stc-opts () {
17 local cur=${COMP_WORDS[COMP_CWORD]}
18 if [ $COMP_CWORD -eq 1 ]; then
19 COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/scenarios && ls -1 | sed 's/.xml//g')" -- $cur ) )
20 fi
21}
22
23complete -F _stc-opts stc
24
25
Thomas Vachuska969d6bc2015-07-29 11:56:57 -070026# Tab completion settings for stl
27function _stl-opts () {
28 local cur=${COMP_WORDS[COMP_CWORD]}
29 if [ $COMP_CWORD -eq 1 ]; then
30 COMPREPLY=( $( compgen -W "$(cd /tmp/stc && ls -1)" -- $cur ) )
31 elif [ $COMP_CWORD -eq 2 ]; then
32 COMPREPLY=( $( compgen -W "$(cd /tmp/stc/$3 && ls -1)" -- $cur ) )
33 fi
34}
35
36complete -F _stl-opts stl
37
38
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070039# Tab completion settings for cell
40function _cell-opts () {
41 local cur=${COMP_WORDS[COMP_CWORD]}
42 if [ $COMP_CWORD -eq 1 ]; then
Thomas Vachuska1eff3a62016-05-03 01:07:24 -070043 COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/cells && ls -1) borrow return status" -- $cur ) )
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070044 fi
45}
46
Thomas Vachuskaea2d9fd2015-09-23 13:13:25 -070047complete -F _cell-opts cell vicell
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070048
Thomas Vachuskacc0b7d62016-07-12 14:03:11 -070049# Tab completion settings for topo recipes
50function _topo-opts () {
51 local cur=${COMP_WORDS[COMP_CWORD]}
52 if [ $COMP_CWORD -eq 1 ]; then
53 COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/topos && ls -1 *.recipe | sed 's/\.recipe//g')" -- $cur ) )
54 fi
55}
56
57complete -F _topo-opts topo
58
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070059
60# Tab completion settings for onos-create-app.
61function _ocapp-opts () {
62 local cur=${COMP_WORDS[COMP_CWORD]}
63 if [ $COMP_CWORD -eq 1 ]; then
Thomas Vachuska36be65f2015-12-08 12:36:15 -080064 COMPREPLY=( $( compgen -W "app bundle ui uitab uitopo cli rest" -- $cur ) )
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070065 fi
66}
67
68complete -F _ocapp-opts onos-create-app