blob: 93de5e0d3c2b6aadd8e394d6b833b59ee3258944 [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
26# Tab completion settings for cell
27function _cell-opts () {
28 local cur=${COMP_WORDS[COMP_CWORD]}
29 if [ $COMP_CWORD -eq 1 ]; then
30 COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/cells && ls -1)" -- $cur ) )
31 fi
32}
33
34complete -F _cell-opts cell
35
36
37# Tab completion settings for onos-create-app.
38function _ocapp-opts () {
39 local cur=${COMP_WORDS[COMP_CWORD]}
40 if [ $COMP_CWORD -eq 1 ]; then
41 COMPREPLY=( $( compgen -W "bundle ui cli" -- $cur ) )
42 fi
43}
44
45complete -F _ocapp-opts onos-create-app