Ayaka Koshibe | 37cffe8 | 2015-06-01 12:01:23 -0700 | [diff] [blame] | 1 | # Options read by onos-group for help message formatting and sanity checks. |
| 2 | GOPTS='install kill patch-vm push-keys uninstall' |
Ayaka Koshibe | aec62962 | 2015-01-05 20:33:29 -0800 | [diff] [blame] | 3 | |
Thomas Vachuska | 4bfccd54 | 2015-05-30 00:35:25 -0700 | [diff] [blame] | 4 | # Tab completion settings for onos-group. |
Ayaka Koshibe | aec62962 | 2015-01-05 20:33:29 -0800 | [diff] [blame] | 5 | function _ogroup-opts () { |
| 6 | local cur=${COMP_WORDS[COMP_CWORD]} |
Ayaka Koshibe | aec62962 | 2015-01-05 20:33:29 -0800 | [diff] [blame] | 7 | if [ $COMP_CWORD -eq 1 ]; then |
Ayaka Koshibe | 37cffe8 | 2015-06-01 12:01:23 -0700 | [diff] [blame] | 8 | COMPREPLY=( $( compgen -W "${GOPTS} help" -- $cur ) ) |
Ayaka Koshibe | aec62962 | 2015-01-05 20:33:29 -0800 | [diff] [blame] | 9 | fi |
| 10 | } |
| 11 | |
| 12 | complete -F _ogroup-opts onos-group |
Thomas Vachuska | 4bfccd54 | 2015-05-30 00:35:25 -0700 | [diff] [blame] | 13 | |
| 14 | |
| 15 | # Tab completion settings for stc |
| 16 | function _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 | |
| 23 | complete -F _stc-opts stc |
| 24 | |
| 25 | |
Thomas Vachuska | 969d6bc | 2015-07-29 11:56:57 -0700 | [diff] [blame] | 26 | # Tab completion settings for stl |
| 27 | function _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 | |
| 36 | complete -F _stl-opts stl |
| 37 | |
| 38 | |
Thomas Vachuska | 4bfccd54 | 2015-05-30 00:35:25 -0700 | [diff] [blame] | 39 | # Tab completion settings for cell |
| 40 | function _cell-opts () { |
| 41 | local cur=${COMP_WORDS[COMP_CWORD]} |
| 42 | if [ $COMP_CWORD -eq 1 ]; then |
| 43 | COMPREPLY=( $( compgen -W "$(cd $ONOS_ROOT/tools/test/cells && ls -1)" -- $cur ) ) |
| 44 | fi |
| 45 | } |
| 46 | |
Thomas Vachuska | ea2d9fd | 2015-09-23 13:13:25 -0700 | [diff] [blame] | 47 | complete -F _cell-opts cell vicell |
Thomas Vachuska | 4bfccd54 | 2015-05-30 00:35:25 -0700 | [diff] [blame] | 48 | |
| 49 | |
| 50 | # Tab completion settings for onos-create-app. |
| 51 | function _ocapp-opts () { |
| 52 | local cur=${COMP_WORDS[COMP_CWORD]} |
| 53 | if [ $COMP_CWORD -eq 1 ]; then |
| 54 | COMPREPLY=( $( compgen -W "bundle ui cli" -- $cur ) ) |
| 55 | fi |
| 56 | } |
| 57 | |
| 58 | complete -F _ocapp-opts onos-create-app |