blob: ff7555158c996381028e8776a5a77d7f450706b1 [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
Thomas Vachuska4d5310c2016-07-14 12:48:39 -070015# Tab completion settings for stc & stw
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070016function _stc-opts () {
17 local cur=${COMP_WORDS[COMP_CWORD]}
Thomas Vachuska4d5310c2016-07-14 12:48:39 -070018 if [ $COMP_CWORD -ge 1 ]; then
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070019 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
Thomas Vachuska4d5310c2016-07-14 12:48:39 -070024complete -F _stc-opts stw
Thomas Vachuskae1125352016-11-09 14:06:51 -080025complete -F _stc-opts stcs
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070026
27
Thomas Vachuska969d6bc2015-07-29 11:56:57 -070028# Tab completion settings for stl
29function _stl-opts () {
30 local cur=${COMP_WORDS[COMP_CWORD]}
31 if [ $COMP_CWORD -eq 1 ]; then
32 COMPREPLY=( $( compgen -W "$(cd /tmp/stc && ls -1)" -- $cur ) )
33 elif [ $COMP_CWORD -eq 2 ]; then
34 COMPREPLY=( $( compgen -W "$(cd /tmp/stc/$3 && ls -1)" -- $cur ) )
35 fi
36}
37
38complete -F _stl-opts stl
39
40
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070041# Tab completion settings for cell
42function _cell-opts () {
43 local cur=${COMP_WORDS[COMP_CWORD]}
44 if [ $COMP_CWORD -eq 1 ]; then
Thomas Vachuska1eff3a62016-05-03 01:07:24 -070045 COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/cells && ls -1) borrow return status" -- $cur ) )
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070046 fi
47}
48
Thomas Vachuskaea2d9fd2015-09-23 13:13:25 -070049complete -F _cell-opts cell vicell
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070050
Thomas Vachuskacc0b7d62016-07-12 14:03:11 -070051# Tab completion settings for topo recipes
52function _topo-opts () {
53 local cur=${COMP_WORDS[COMP_CWORD]}
54 if [ $COMP_CWORD -eq 1 ]; then
55 COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/topos && ls -1 *.recipe | sed 's/\.recipe//g')" -- $cur ) )
56 fi
57}
58
59complete -F _topo-opts topo
60
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070061
62# Tab completion settings for onos-create-app.
63function _ocapp-opts () {
64 local cur=${COMP_WORDS[COMP_CWORD]}
65 if [ $COMP_CWORD -eq 1 ]; then
Sean Condona36f65c2019-05-20 08:21:41 +010066 COMPREPLY=( $( compgen -W "app bundle ui ui2 uitab uitopo cli rest" -- $cur ) )
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070067 fi
68}
69
70complete -F _ocapp-opts onos-create-app